drizzle-kit 0.9.2 → 0.9.6

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.
Files changed (58) hide show
  1. package/drizzle.js +4 -0
  2. package/drizzle.js.map +1 -0
  3. package/package.json +2 -2
  4. package/.eslintrc +0 -21
  5. package/config.yml +0 -4
  6. package/data/_prev/multi.ts +0 -43
  7. package/data/_prev/tables/authOtpTable.ts +0 -22
  8. package/data/_prev/tables/cityTable.ts +0 -17
  9. package/data/_prev/tables/usersTable.ts +0 -18
  10. package/data/_prev/types/types.ts +0 -11
  11. package/data/v1/tables/authOtpTable.ts +0 -18
  12. package/data/v1/tables/deletedTable.ts +0 -9
  13. package/data/v1/tables/usersTable.ts +0 -15
  14. package/data/v1/types/types.ts +0 -6
  15. package/data/v2/tables/authOtpTable.ts +0 -22
  16. package/data/v2/tables/cityTable.ts +0 -10
  17. package/data/v2/tables/usersTable.ts +0 -19
  18. package/data/v2/types/types.ts +0 -11
  19. package/data/v3/tables/authOtpTable.ts +0 -21
  20. package/data/v3/tables/cityTable.ts +0 -17
  21. package/data/v3/tables/usersTable.ts +0 -18
  22. package/data/v3/types/types.ts +0 -11
  23. package/dist/drizzle.js +0 -2136
  24. package/dist/drizzle.js.map +0 -1
  25. package/dist/package.json +0 -85
  26. package/factory.ts +0 -224
  27. package/fstest.ts +0 -50
  28. package/index.ts +0 -16
  29. package/readme.md +0 -9
  30. package/serializer.ts +0 -139
  31. package/src/cli/commands/migration/index.tsx +0 -10
  32. package/src/cli/commands/migration/migrate/index.tsx +0 -164
  33. package/src/cli/components-api/ComponentsList.tsx +0 -20
  34. package/src/cli/components-api/CreateApp.tsx +0 -19
  35. package/src/cli/components-api/components/PromptColumnsConflicts.tsx +0 -171
  36. package/src/cli/components-api/components/PromptTablesConflicts.tsx +0 -180
  37. package/src/cli/components-api/components/Task.tsx +0 -85
  38. package/src/cli/components-api/index.tsx +0 -76
  39. package/src/cli/enq.ts +0 -41
  40. package/src/cli/index.tsx +0 -8
  41. package/src/cli/machines/resolveColumnsMachine.ts +0 -179
  42. package/src/cli/machines/resolveTablesMachine.ts +0 -169
  43. package/src/cli/utils/formatDataForTable.ts +0 -36
  44. package/src/cli/utils/valuesForPrompts.ts +0 -35
  45. package/src/diff.ts +0 -272
  46. package/src/differ.js +0 -135
  47. package/src/jsonStatements.js +0 -176
  48. package/src/migrationPreparator.ts +0 -47
  49. package/src/serilizer/factory.ts +0 -340
  50. package/src/serilizer/index.ts +0 -25
  51. package/src/simulator.ts +0 -85
  52. package/src/sqlgenerator.js +0 -373
  53. package/test-build.js +0 -26
  54. package/test.ts +0 -57
  55. package/testFactory.js +0 -3
  56. package/testFactory.ts +0 -26
  57. package/tsconfig.json +0 -28
  58. package/webpack.config.js +0 -53
@@ -1,10 +0,0 @@
1
- import { AbstractTable } from 'drizzle-orm';
2
-
3
- export default class CitiesTable extends AbstractTable<CitiesTable> {
4
- public name = this.timestamp('name', { notNull: true }).defaultValue(new Date());
5
- public data = this.jsonb<string[]>('data');
6
-
7
- public tableName(): string {
8
- return 'cities';
9
- }
10
- }
@@ -1,19 +0,0 @@
1
- import { AbstractTable } from "drizzle-orm";
2
-
3
- export default class UsersTable extends AbstractTable<UsersTable> {
4
- public id = this.int('id').autoIncrement().primaryKey();
5
- public phone = this.varchar('phone', { size: 256 }).unique();
6
- public fullName = this.varchar('full_name_to_alter', { size: 512 });
7
-
8
- public createdAt = this.timestamp('created_at', { notNull: true });
9
- public updatedAt = this.timestamp('updated_at', { notNull: true });
10
-
11
- public phoneFullNameIndex = this.index([this.phone, this.fullName]);
12
-
13
- // deleted
14
- // public fullNameIndex = this.index(this.fullName);
15
-
16
- public tableName(): string {
17
- return 'users2';
18
- }
19
- }
@@ -1,11 +0,0 @@
1
- import { createEnum } from "drizzle-orm/types/type";
2
-
3
- export const rolesEnum = createEnum({
4
- alias: "roles_enum",
5
- values: ["role1", "role2", "role3"],
6
- });
7
-
8
- export const roles2Enum = createEnum({
9
- alias: "roles2_enum",
10
- values: ["role1.1", "role2.2", "role3.3"],
11
- });
@@ -1,21 +0,0 @@
1
- import { AbstractTable } from 'drizzle-orm';
2
- import UsersTable from './usersTable';
3
- import { rolesEnum } from '../types/types';
4
-
5
- export default class AuthOtpTable extends AbstractTable<AuthOtpTable> {
6
- public id = this.int('id').autoIncrement().primaryKey();
7
- public phone = this.varchar('phone', { size: 256 });
8
- public otp = this.varchar('otp', { size: 256 });
9
- public issuedAt = this.timestamp('issued_at', { notNull: true });
10
- public createdAt = this.timestamp('created_at', { notNull: true });
11
- public updatedAt = this.timestamp('updated_at', { notNull: true });
12
-
13
- public roleEnum = this.type(rolesEnum, 'role')
14
- public userId = this.int('user_id').foreignKey(UsersTable, (table) => table.id);
15
-
16
- public test = this.jsonb<string[]>('test');
17
-
18
- public tableName(): string {
19
- return 'auth_otp';
20
- }
21
- }
@@ -1,17 +0,0 @@
1
- import { AbstractTable } from 'drizzle-orm';
2
- import UsersTable from './usersTable';
3
- import { rolesEnum } from '../types/types';
4
-
5
- export default class CitiesTable extends AbstractTable<CitiesTable> {
6
- public name = this.timestamp('name', { notNull: true }).defaultValue(new Date());
7
- public page = this.varchar('page', { size: 256 });
8
- public roleEnum = this.type(rolesEnum, 'role')
9
-
10
- public userId1 = this.int('user_id').foreignKey(UsersTable, (table) => table.id);
11
-
12
- public data = this.jsonb<string[]>('data');
13
-
14
- public tableName(): string {
15
- return 'citiess';
16
- }
17
- }
@@ -1,18 +0,0 @@
1
- import { AbstractTable } from "drizzle-orm";
2
-
3
- export default class UsersTable extends AbstractTable<UsersTable> {
4
- public id = this.int('id').autoIncrement().primaryKey();
5
- public phone = this.varchar('phone', { size: 256 }).unique();
6
- public fullName = this.varchar('full_name', { size: 512 });
7
- public test = this.decimal('test', { notNull: true, precision: 100, scale: 2 });
8
- public test1 = this.bigint('test1', { notNull: true });
9
- public createdAt = this.timestamp('created_at', { notNull: true });
10
- public updatedAt = this.timestamp('updated_at', { notNull: true });
11
-
12
- public phoneFullNameIndex = this.index([this.phone, this.fullName]);
13
- public phoneIndex = this.index(this.phone);
14
-
15
- public tableName(): string {
16
- return 'users';
17
- }
18
- }
@@ -1,11 +0,0 @@
1
- import { createEnum } from "drizzle-orm/types/type";
2
-
3
- export const rolesEnum = createEnum({
4
- alias: "roles_enum",
5
- values: ["role1", "role2", "role3"],
6
- });
7
-
8
- export const roles2Enum = createEnum({
9
- alias: "roles2_enum",
10
- values: ["role1.1", "role2.2", "role3.3"],
11
- });