@anthonyalayo/drizzle-kit 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.d.mts +2891 -0
- package/api.d.ts +2891 -0
- package/api.js +47534 -0
- package/api.mjs +47521 -0
- package/bin.cjs +80043 -0
- package/{src/index.ts → index-Z-1TKnbX.d.mts} +123 -141
- package/index-Z-1TKnbX.d.ts +308 -0
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/index.js +32 -0
- package/index.mjs +7 -0
- package/package.json +2 -2
- package/utils.js +6056 -0
- package/utils.mjs +6032 -0
- package/.gitignore +0 -25
- package/build.dev.ts +0 -51
- package/build.ts +0 -112
- package/imports-checker/analyze.ts +0 -78
- package/imports-checker/checker.ts +0 -296
- package/imports-checker/grammar/grammar.ohm +0 -121
- package/imports-checker/grammar/grammar.ohm-bundle.d.ts +0 -164
- package/imports-checker/grammar/grammar.ohm-bundle.js +0 -753
- package/imports-checker/index.ts +0 -48
- package/patches/difflib@0.2.4.patch +0 -31
- package/src/@types/utils.ts +0 -58
- package/src/api.ts +0 -504
- package/src/cli/commands/_es5.ts +0 -2
- package/src/cli/commands/check.ts +0 -52
- package/src/cli/commands/drop.ts +0 -60
- package/src/cli/commands/introspect.ts +0 -772
- package/src/cli/commands/libSqlPushUtils.ts +0 -355
- package/src/cli/commands/migrate.ts +0 -1526
- package/src/cli/commands/mysqlIntrospect.ts +0 -53
- package/src/cli/commands/mysqlPushUtils.ts +0 -352
- package/src/cli/commands/mysqlUp.ts +0 -102
- package/src/cli/commands/pgIntrospect.ts +0 -55
- package/src/cli/commands/pgPushUtils.ts +0 -269
- package/src/cli/commands/pgUp.ts +0 -217
- package/src/cli/commands/push.ts +0 -637
- package/src/cli/commands/singlestoreIntrospect.ts +0 -53
- package/src/cli/commands/singlestorePushUtils.ts +0 -456
- package/src/cli/commands/singlestoreUp.ts +0 -1
- package/src/cli/commands/sqliteIntrospect.ts +0 -96
- package/src/cli/commands/sqlitePushUtils.ts +0 -322
- package/src/cli/commands/sqliteUp.ts +0 -52
- package/src/cli/commands/utils.ts +0 -858
- package/src/cli/connections.ts +0 -914
- package/src/cli/index.ts +0 -48
- package/src/cli/schema.ts +0 -794
- package/src/cli/selector-ui.ts +0 -38
- package/src/cli/utils.ts +0 -112
- package/src/cli/validations/cli.ts +0 -79
- package/src/cli/validations/common.ts +0 -193
- package/src/cli/validations/libsql.ts +0 -27
- package/src/cli/validations/mysql.ts +0 -61
- package/src/cli/validations/outputs.ts +0 -91
- package/src/cli/validations/postgres.ts +0 -83
- package/src/cli/validations/singlestore.ts +0 -61
- package/src/cli/validations/sqlite.ts +0 -104
- package/src/cli/validations/studio.ts +0 -24
- package/src/cli/views.ts +0 -658
- package/src/extensions/getTablesFilterByExtensions.ts +0 -16
- package/src/extensions/vector.ts +0 -10
- package/src/global.ts +0 -61
- package/src/introspect-mysql.ts +0 -1030
- package/src/introspect-pg.ts +0 -1435
- package/src/introspect-singlestore.ts +0 -913
- package/src/introspect-sqlite.ts +0 -533
- package/src/jsonDiffer.js +0 -882
- package/src/jsonStatements.ts +0 -3590
- package/src/loader.mjs +0 -57
- package/src/migrationPreparator.ts +0 -217
- package/src/schemaValidator.ts +0 -23
- package/src/serializer/index.ts +0 -142
- package/src/serializer/mysqlImports.ts +0 -38
- package/src/serializer/mysqlSchema.ts +0 -423
- package/src/serializer/mysqlSerializer.ts +0 -999
- package/src/serializer/pgImports.ts +0 -106
- package/src/serializer/pgSchema.ts +0 -937
- package/src/serializer/pgSerializer.ts +0 -2223
- package/src/serializer/singlestoreImports.ts +0 -38
- package/src/serializer/singlestoreSchema.ts +0 -257
- package/src/serializer/singlestoreSerializer.ts +0 -767
- package/src/serializer/sqliteImports.ts +0 -41
- package/src/serializer/sqliteSchema.ts +0 -352
- package/src/serializer/sqliteSerializer.ts +0 -931
- package/src/serializer/studio.ts +0 -694
- package/src/serializer/utils.ts +0 -45
- package/src/simulator.ts +0 -157
- package/src/snapshotsDiffer.ts +0 -4398
- package/src/sqlgenerator.ts +0 -4212
- package/src/statementCombiner.ts +0 -597
- package/src/utils/certs.ts +0 -44
- package/src/utils/words.ts +0 -1333
- package/src/utils.ts +0 -370
- package/tests/bin.test.ts +0 -58
- package/tests/cli/d1http.config.ts +0 -12
- package/tests/cli/drizzle.config.ts +0 -9
- package/tests/cli/durable-sqlite.config.ts +0 -7
- package/tests/cli/expo.config.ts +0 -7
- package/tests/cli/postgres.config.ts +0 -13
- package/tests/cli/postgres2.config.ts +0 -17
- package/tests/cli/schema.ts +0 -1
- package/tests/cli/turso.config.ts +0 -10
- package/tests/cli-export.test.ts +0 -79
- package/tests/cli-generate.test.ts +0 -259
- package/tests/cli-migrate.test.ts +0 -103
- package/tests/cli-push.test.ts +0 -126
- package/tests/common.ts +0 -15
- package/tests/indexes/common.ts +0 -21
- package/tests/indexes/pg.test.ts +0 -245
- package/tests/introspect/libsql.test.ts +0 -35
- package/tests/introspect/mysql.test.ts +0 -319
- package/tests/introspect/pg.test.ts +0 -894
- package/tests/introspect/singlestore.test.ts +0 -275
- package/tests/introspect/sqlite.test.ts +0 -122
- package/tests/libsql-checks.test.ts +0 -308
- package/tests/libsql-statements.test.ts +0 -989
- package/tests/libsql-views.test.ts +0 -218
- package/tests/migrate/libsq-schema.ts +0 -6
- package/tests/migrate/libsql-migrate.test.ts +0 -58
- package/tests/migrate/migrations/0000_little_blizzard.sql +0 -4
- package/tests/migrate/migrations/0001_nebulous_storm.sql +0 -10
- package/tests/migrate/migrations/meta/0000_snapshot.json +0 -40
- package/tests/migrate/migrations/meta/0001_snapshot.json +0 -40
- package/tests/migrate/migrations/meta/_journal.json +0 -20
- package/tests/mysql-checks.test.ts +0 -291
- package/tests/mysql-generated.test.ts +0 -1290
- package/tests/mysql-schemas.test.ts +0 -156
- package/tests/mysql-views.test.ts +0 -553
- package/tests/mysql.test.ts +0 -863
- package/tests/pg-array.test.ts +0 -368
- package/tests/pg-checks.test.ts +0 -329
- package/tests/pg-columns.test.ts +0 -484
- package/tests/pg-domains.test.ts +0 -306
- package/tests/pg-enums.test.ts +0 -751
- package/tests/pg-generated.test.ts +0 -529
- package/tests/pg-identity.test.ts +0 -447
- package/tests/pg-schemas.test.ts +0 -105
- package/tests/pg-sequences.test.ts +0 -298
- package/tests/pg-tables.test.ts +0 -1021
- package/tests/pg-views.test.ts +0 -1929
- package/tests/push/common.ts +0 -58
- package/tests/push/libsql.test.ts +0 -1400
- package/tests/push/mysql-push.test.ts +0 -345
- package/tests/push/mysql.test.ts +0 -788
- package/tests/push/pg.test.ts +0 -4341
- package/tests/push/singlestore-push.test.ts +0 -894
- package/tests/push/singlestore.test.ts +0 -444
- package/tests/push/sqlite.test.ts +0 -1613
- package/tests/rls/pg-policy.test.ts +0 -1656
- package/tests/rls/pg-role.test.ts +0 -234
- package/tests/schemaDiffer.ts +0 -2852
- package/tests/singlestore-generated.test.ts +0 -1290
- package/tests/singlestore-schemas.test.ts +0 -155
- package/tests/singlestore.test.ts +0 -978
- package/tests/sqlite-checks.test.ts +0 -308
- package/tests/sqlite-columns.test.ts +0 -1049
- package/tests/sqlite-generated.test.ts +0 -1726
- package/tests/sqlite-tables.test.ts +0 -637
- package/tests/sqlite-views.test.ts +0 -218
- package/tests/statements-combiner/libsql-statements-combiner.test.ts +0 -1812
- package/tests/statements-combiner/singlestore-statements-combiner.test.ts +0 -882
- package/tests/statements-combiner/sqlite-statements-combiner.test.ts +0 -1211
- package/tests/test/sqlite.test.ts +0 -39
- package/tests/testsinglestore.ts +0 -29
- package/tests/validations.test.ts +0 -869
- package/tests/wrap-param.test.ts +0 -16
- package/tsconfig.build.json +0 -4
- package/tsconfig.cli-types.json +0 -9
- package/tsconfig.json +0 -28
- package/vitest.config.ts +0 -34
package/tests/push/common.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { afterAll, beforeAll, beforeEach, test } from 'vitest';
|
|
2
|
-
|
|
3
|
-
export interface DialectSuite {
|
|
4
|
-
allTypes(context?: any): Promise<void>;
|
|
5
|
-
addBasicIndexes(context?: any): Promise<void>;
|
|
6
|
-
changeIndexFields(context?: any): Promise<void>;
|
|
7
|
-
dropIndex(context?: any): Promise<void>;
|
|
8
|
-
indexesToBeNotTriggered(context?: any): Promise<void>;
|
|
9
|
-
indexesTestCase1(context?: any): Promise<void>;
|
|
10
|
-
addNotNull(context?: any): Promise<void>;
|
|
11
|
-
addNotNullWithDataNoRollback(context?: any): Promise<void>;
|
|
12
|
-
addBasicSequences(context?: any): Promise<void>;
|
|
13
|
-
addGeneratedColumn(context?: any): Promise<void>;
|
|
14
|
-
addGeneratedToColumn(context?: any): Promise<void>;
|
|
15
|
-
dropGeneratedConstraint(context?: any): Promise<void>;
|
|
16
|
-
alterGeneratedConstraint(context?: any): Promise<void>;
|
|
17
|
-
createTableWithGeneratedConstraint(context?: any): Promise<void>;
|
|
18
|
-
createCompositePrimaryKey(context?: any): Promise<void>;
|
|
19
|
-
renameTableWithCompositePrimaryKey(context?: any): Promise<void>;
|
|
20
|
-
case1(): Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const run = (
|
|
24
|
-
suite: DialectSuite,
|
|
25
|
-
beforeAllFn?: (context: any) => Promise<void>,
|
|
26
|
-
afterAllFn?: (context: any) => Promise<void>,
|
|
27
|
-
beforeEachFn?: (context: any) => Promise<void>,
|
|
28
|
-
) => {
|
|
29
|
-
let context: any = {};
|
|
30
|
-
beforeAll(beforeAllFn ? () => beforeAllFn(context) : () => {});
|
|
31
|
-
|
|
32
|
-
beforeEach(beforeEachFn ? () => beforeEachFn(context) : () => {});
|
|
33
|
-
|
|
34
|
-
test('No diffs for all database types', () => suite.allTypes(context));
|
|
35
|
-
test('Adding basic indexes', () => suite.addBasicIndexes(context));
|
|
36
|
-
test('Dropping basic index', () => suite.dropIndex(context));
|
|
37
|
-
test('Altering indexes', () => suite.changeIndexFields(context));
|
|
38
|
-
test('Indexes properties that should not trigger push changes', () => suite.indexesToBeNotTriggered(context));
|
|
39
|
-
test('Indexes test case #1', () => suite.indexesTestCase1(context));
|
|
40
|
-
test('Drop column', () => suite.case1());
|
|
41
|
-
|
|
42
|
-
test('Add not null to a column', () => suite.addNotNull());
|
|
43
|
-
test('Add not null to a column with null data. Should rollback', () => suite.addNotNullWithDataNoRollback());
|
|
44
|
-
|
|
45
|
-
test('Add basic sequences', () => suite.addBasicSequences());
|
|
46
|
-
|
|
47
|
-
test('Add generated column', () => suite.addGeneratedColumn(context));
|
|
48
|
-
test('Add generated constraint to an existing column', () => suite.addGeneratedToColumn(context));
|
|
49
|
-
test('Drop generated constraint from a column', () => suite.dropGeneratedConstraint(context));
|
|
50
|
-
// should ignore on push
|
|
51
|
-
test('Alter generated constraint', () => suite.alterGeneratedConstraint(context));
|
|
52
|
-
test('Create table with generated column', () => suite.createTableWithGeneratedConstraint(context));
|
|
53
|
-
test('Rename table with composite primary key', () => suite.renameTableWithCompositePrimaryKey(context));
|
|
54
|
-
|
|
55
|
-
test('Create composite primary key', () => suite.createCompositePrimaryKey(context));
|
|
56
|
-
|
|
57
|
-
afterAll(afterAllFn ? () => afterAllFn(context) : () => {});
|
|
58
|
-
};
|