create-absolutejs 0.18.0 → 0.19.0

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 (67) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/changelog.json +14 -0
  3. package/dist/commands/migrateDatabase.d.ts +6 -0
  4. package/dist/commands/migrateDatabase.js +53 -0
  5. package/dist/data.d.ts +1 -1
  6. package/dist/data.js +1 -0
  7. package/dist/generators/configurations/generateDrizzleConfig.d.ts +5 -3
  8. package/dist/generators/configurations/generateDrizzleConfig.js +40 -14
  9. package/dist/generators/configurations/generateEnv.js +6 -0
  10. package/dist/generators/configurations/generatePackageJson.js +30 -3
  11. package/dist/generators/db/drizzleTargets.d.ts +5 -0
  12. package/dist/generators/db/drizzleTargets.js +27 -0
  13. package/dist/generators/db/generateDatabaseTypes.js +10 -6
  14. package/dist/generators/db/generateDockerContainer.d.ts +5 -0
  15. package/dist/generators/db/generateDockerContainer.js +22 -4
  16. package/dist/generators/db/generateDrizzleSchema.js +65 -81
  17. package/dist/generators/db/handlerTemplates.d.ts +4 -4
  18. package/dist/generators/db/handlerTemplates.js +7 -10
  19. package/dist/generators/db/scaffoldDatabase.js +17 -4
  20. package/dist/generators/db/scaffoldDocker.d.ts +2 -1
  21. package/dist/generators/db/scaffoldDocker.js +7 -3
  22. package/dist/generators/project/generateDBBlock.js +11 -2
  23. package/dist/generators/project/generateImportsBlock.js +11 -6
  24. package/dist/generators/project/generateServer.js +2 -1
  25. package/dist/index.js +2 -1
  26. package/dist/messages.d.ts +2 -1
  27. package/dist/messages.js +2 -1
  28. package/dist/questions/authOption.js +4 -1
  29. package/dist/questions/databaseEngine.d.ts +1 -1
  30. package/dist/scaffold.d.ts +1 -0
  31. package/dist/scaffold.js +21 -3
  32. package/dist/templates/configurations/eslint.config.example.mjs +80 -41
  33. package/dist/templates/db/migrations/cockroach-count-history/20260926210314_init/migration.sql +5 -0
  34. package/dist/templates/db/migrations/cockroach-count-history/20260926210314_init/snapshot.json +69 -0
  35. package/dist/templates/db/migrations/cockroach-users/20260926210315_init/migration.sql +5 -0
  36. package/dist/templates/db/migrations/cockroach-users/20260926210315_init/snapshot.json +62 -0
  37. package/dist/templates/db/migrations/mssql-count-history/20260926210316_init/migration.sql +6 -0
  38. package/dist/templates/db/migrations/mssql-count-history/20260926210316_init/snapshot.json +64 -0
  39. package/dist/templates/db/migrations/mssql-users/20260926210317_init/migration.sql +6 -0
  40. package/dist/templates/db/migrations/mssql-users/20260926210317_init/snapshot.json +70 -0
  41. package/dist/templates/db/migrations/mysql-count-history/20260926210318_init/migration.sql +5 -0
  42. package/dist/templates/db/migrations/mysql-count-history/20260926210318_init/snapshot.json +61 -0
  43. package/dist/templates/db/migrations/mysql-users/20260926210319_init/migration.sql +5 -0
  44. package/dist/templates/db/migrations/mysql-users/20260926210319_init/snapshot.json +61 -0
  45. package/dist/templates/db/migrations/postgresql-count-history/20260926210320_init/migration.sql +5 -0
  46. package/dist/templates/db/migrations/postgresql-count-history/20260926210320_init/snapshot.json +71 -0
  47. package/dist/templates/db/migrations/postgresql-users/20260926210320_init/migration.sql +5 -0
  48. package/dist/templates/db/migrations/postgresql-users/20260926210320_init/snapshot.json +62 -0
  49. package/dist/templates/db/migrations/singlestore-count-history/20260926210321_init/migration.sql +5 -0
  50. package/dist/templates/db/migrations/singlestore-count-history/20260926210321_init/snapshot.json +61 -0
  51. package/dist/templates/db/migrations/singlestore-users/20260926210322_init/migration.sql +5 -0
  52. package/dist/templates/db/migrations/singlestore-users/20260926210322_init/snapshot.json +61 -0
  53. package/dist/templates/db/migrations/sqlite-count-history/20260926210323_init/migration.sql +5 -0
  54. package/dist/templates/db/migrations/sqlite-count-history/20260926210323_init/snapshot.json +50 -0
  55. package/dist/templates/db/migrations/sqlite-users/20260926210324_init/migration.sql +5 -0
  56. package/dist/templates/db/migrations/sqlite-users/20260926210324_init/snapshot.json +50 -0
  57. package/dist/templates/db/migrations/turso-count-history/20260926210324_init/migration.sql +5 -0
  58. package/dist/templates/db/migrations/turso-count-history/20260926210324_init/snapshot.json +50 -0
  59. package/dist/templates/db/migrations/turso-users/20260926210325_init/migration.sql +5 -0
  60. package/dist/templates/db/migrations/turso-users/20260926210325_init/snapshot.json +50 -0
  61. package/dist/templates/git/gitignore +0 -3
  62. package/dist/typeGuards.js +2 -2
  63. package/dist/utils/parseCommandLineOptions.js +16 -25
  64. package/dist/utils/validateDatabaseSelection.d.ts +11 -0
  65. package/dist/utils/validateDatabaseSelection.js +31 -0
  66. package/package.json +3 -1
  67. package/dist/templates/configurations/drizzle.config.ts +0 -13
@@ -0,0 +1,64 @@
1
+ {
2
+ "version": "2",
3
+ "dialect": "mssql",
4
+ "id": "425df2f4-c774-4d68-870e-936662d9c250",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "count_history",
9
+ "entityType": "tables",
10
+ "schema": "dbo"
11
+ },
12
+ {
13
+ "type": "int",
14
+ "notNull": true,
15
+ "generated": null,
16
+ "identity": {
17
+ "seed": 1,
18
+ "increment": 1
19
+ },
20
+ "name": "uid",
21
+ "schema": "dbo",
22
+ "entityType": "columns",
23
+ "table": "count_history"
24
+ },
25
+ {
26
+ "type": "int",
27
+ "notNull": true,
28
+ "generated": null,
29
+ "identity": null,
30
+ "name": "count",
31
+ "schema": "dbo",
32
+ "entityType": "columns",
33
+ "table": "count_history"
34
+ },
35
+ {
36
+ "type": "datetime2",
37
+ "notNull": true,
38
+ "generated": null,
39
+ "identity": null,
40
+ "name": "created_at",
41
+ "schema": "dbo",
42
+ "entityType": "columns",
43
+ "table": "count_history"
44
+ },
45
+ {
46
+ "nameExplicit": false,
47
+ "columns": ["uid"],
48
+ "name": "count_history_pkey",
49
+ "table": "count_history",
50
+ "schema": "dbo",
51
+ "entityType": "pks"
52
+ },
53
+ {
54
+ "column": "created_at",
55
+ "nameExplicit": false,
56
+ "default": "(sysdatetime())",
57
+ "name": "count_history_created_at_default",
58
+ "entityType": "defaults",
59
+ "schema": "dbo",
60
+ "table": "count_history"
61
+ }
62
+ ],
63
+ "renames": []
64
+ }
@@ -0,0 +1,6 @@
1
+ CREATE TABLE [users] (
2
+ [auth_sub] nvarchar(255),
3
+ [created_at] datetime2 NOT NULL CONSTRAINT [users_created_at_default] DEFAULT (sysdatetime()),
4
+ [metadata] nvarchar(max) CONSTRAINT [users_metadata_default] DEFAULT ('{}'),
5
+ CONSTRAINT [users_pkey] PRIMARY KEY([auth_sub])
6
+ );
@@ -0,0 +1,70 @@
1
+ {
2
+ "version": "2",
3
+ "dialect": "mssql",
4
+ "id": "c491f825-d719-4383-8371-1d24485e8ddb",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "users",
9
+ "entityType": "tables",
10
+ "schema": "dbo"
11
+ },
12
+ {
13
+ "type": "nvarchar(255)",
14
+ "notNull": true,
15
+ "generated": null,
16
+ "identity": null,
17
+ "name": "auth_sub",
18
+ "schema": "dbo",
19
+ "entityType": "columns",
20
+ "table": "users"
21
+ },
22
+ {
23
+ "type": "datetime2",
24
+ "notNull": true,
25
+ "generated": null,
26
+ "identity": null,
27
+ "name": "created_at",
28
+ "schema": "dbo",
29
+ "entityType": "columns",
30
+ "table": "users"
31
+ },
32
+ {
33
+ "type": "nvarchar(max)",
34
+ "notNull": false,
35
+ "generated": null,
36
+ "identity": null,
37
+ "name": "metadata",
38
+ "schema": "dbo",
39
+ "entityType": "columns",
40
+ "table": "users"
41
+ },
42
+ {
43
+ "nameExplicit": false,
44
+ "columns": ["auth_sub"],
45
+ "name": "users_pkey",
46
+ "table": "users",
47
+ "schema": "dbo",
48
+ "entityType": "pks"
49
+ },
50
+ {
51
+ "column": "created_at",
52
+ "nameExplicit": false,
53
+ "default": "(sysdatetime())",
54
+ "name": "users_created_at_default",
55
+ "entityType": "defaults",
56
+ "schema": "dbo",
57
+ "table": "users"
58
+ },
59
+ {
60
+ "column": "metadata",
61
+ "nameExplicit": false,
62
+ "default": "('{}')",
63
+ "name": "users_metadata_default",
64
+ "entityType": "defaults",
65
+ "schema": "dbo",
66
+ "table": "users"
67
+ }
68
+ ],
69
+ "renames": []
70
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `count_history` (
2
+ `uid` int AUTO_INCREMENT PRIMARY KEY,
3
+ `count` int NOT NULL,
4
+ `created_at` timestamp NOT NULL DEFAULT (now())
5
+ );
@@ -0,0 +1,61 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "mysql",
4
+ "id": "658c0ebf-8885-4a5b-80a8-198504da6d23",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "count_history",
9
+ "entityType": "tables"
10
+ },
11
+ {
12
+ "type": "int",
13
+ "notNull": true,
14
+ "autoIncrement": true,
15
+ "default": null,
16
+ "onUpdateNow": false,
17
+ "onUpdateNowFsp": null,
18
+ "charSet": null,
19
+ "collation": null,
20
+ "generated": null,
21
+ "name": "uid",
22
+ "entityType": "columns",
23
+ "table": "count_history"
24
+ },
25
+ {
26
+ "type": "int",
27
+ "notNull": true,
28
+ "autoIncrement": false,
29
+ "default": null,
30
+ "onUpdateNow": false,
31
+ "onUpdateNowFsp": null,
32
+ "charSet": null,
33
+ "collation": null,
34
+ "generated": null,
35
+ "name": "count",
36
+ "entityType": "columns",
37
+ "table": "count_history"
38
+ },
39
+ {
40
+ "type": "timestamp",
41
+ "notNull": true,
42
+ "autoIncrement": false,
43
+ "default": "(now())",
44
+ "onUpdateNow": false,
45
+ "onUpdateNowFsp": null,
46
+ "charSet": null,
47
+ "collation": null,
48
+ "generated": null,
49
+ "name": "created_at",
50
+ "entityType": "columns",
51
+ "table": "count_history"
52
+ },
53
+ {
54
+ "columns": ["uid"],
55
+ "name": "PRIMARY",
56
+ "table": "count_history",
57
+ "entityType": "pks"
58
+ }
59
+ ],
60
+ "renames": []
61
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `users` (
2
+ `auth_sub` varchar(255) PRIMARY KEY,
3
+ `created_at` timestamp NOT NULL DEFAULT (now()),
4
+ `metadata` json DEFAULT ('{}')
5
+ );
@@ -0,0 +1,61 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "mysql",
4
+ "id": "74e2d582-26d7-4879-aff9-8f2c140b5eab",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "users",
9
+ "entityType": "tables"
10
+ },
11
+ {
12
+ "type": "varchar(255)",
13
+ "notNull": true,
14
+ "autoIncrement": false,
15
+ "default": null,
16
+ "onUpdateNow": false,
17
+ "onUpdateNowFsp": null,
18
+ "charSet": null,
19
+ "collation": null,
20
+ "generated": null,
21
+ "name": "auth_sub",
22
+ "entityType": "columns",
23
+ "table": "users"
24
+ },
25
+ {
26
+ "type": "timestamp",
27
+ "notNull": true,
28
+ "autoIncrement": false,
29
+ "default": "(now())",
30
+ "onUpdateNow": false,
31
+ "onUpdateNowFsp": null,
32
+ "charSet": null,
33
+ "collation": null,
34
+ "generated": null,
35
+ "name": "created_at",
36
+ "entityType": "columns",
37
+ "table": "users"
38
+ },
39
+ {
40
+ "type": "json",
41
+ "notNull": false,
42
+ "autoIncrement": false,
43
+ "default": "('{}')",
44
+ "onUpdateNow": false,
45
+ "onUpdateNowFsp": null,
46
+ "charSet": null,
47
+ "collation": null,
48
+ "generated": null,
49
+ "name": "metadata",
50
+ "entityType": "columns",
51
+ "table": "users"
52
+ },
53
+ {
54
+ "columns": ["auth_sub"],
55
+ "name": "PRIMARY",
56
+ "table": "users",
57
+ "entityType": "pks"
58
+ }
59
+ ],
60
+ "renames": []
61
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE "count_history" (
2
+ "uid" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "count_history_uid_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
3
+ "count" integer NOT NULL,
4
+ "created_at" timestamp DEFAULT now() NOT NULL
5
+ );
@@ -0,0 +1,71 @@
1
+ {
2
+ "version": "8",
3
+ "dialect": "postgres",
4
+ "id": "5a337cba-4b12-418c-b4fe-ae38fdc5ba8a",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "isRlsEnabled": false,
9
+ "name": "count_history",
10
+ "entityType": "tables",
11
+ "schema": "public"
12
+ },
13
+ {
14
+ "type": "integer",
15
+ "typeSchema": null,
16
+ "notNull": true,
17
+ "dimensions": 0,
18
+ "default": null,
19
+ "generated": null,
20
+ "identity": {
21
+ "type": "always",
22
+ "name": "count_history_uid_seq",
23
+ "increment": "1",
24
+ "startWith": "1",
25
+ "minValue": "1",
26
+ "maxValue": "2147483647",
27
+ "cache": 1,
28
+ "cycle": false
29
+ },
30
+ "name": "uid",
31
+ "entityType": "columns",
32
+ "schema": "public",
33
+ "table": "count_history"
34
+ },
35
+ {
36
+ "type": "integer",
37
+ "typeSchema": null,
38
+ "notNull": true,
39
+ "dimensions": 0,
40
+ "default": null,
41
+ "generated": null,
42
+ "identity": null,
43
+ "name": "count",
44
+ "entityType": "columns",
45
+ "schema": "public",
46
+ "table": "count_history"
47
+ },
48
+ {
49
+ "type": "timestamp",
50
+ "typeSchema": null,
51
+ "notNull": true,
52
+ "dimensions": 0,
53
+ "default": "now()",
54
+ "generated": null,
55
+ "identity": null,
56
+ "name": "created_at",
57
+ "entityType": "columns",
58
+ "schema": "public",
59
+ "table": "count_history"
60
+ },
61
+ {
62
+ "columns": ["uid"],
63
+ "nameExplicit": false,
64
+ "name": "count_history_pkey",
65
+ "schema": "public",
66
+ "table": "count_history",
67
+ "entityType": "pks"
68
+ }
69
+ ],
70
+ "renames": []
71
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE "users" (
2
+ "auth_sub" varchar(255) PRIMARY KEY,
3
+ "created_at" timestamp DEFAULT now() NOT NULL,
4
+ "metadata" jsonb DEFAULT '{}'
5
+ );
@@ -0,0 +1,62 @@
1
+ {
2
+ "version": "8",
3
+ "dialect": "postgres",
4
+ "id": "9d194a19-609c-4f6f-8d0e-fe03ad5d72d7",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "isRlsEnabled": false,
9
+ "name": "users",
10
+ "entityType": "tables",
11
+ "schema": "public"
12
+ },
13
+ {
14
+ "type": "varchar(255)",
15
+ "typeSchema": null,
16
+ "notNull": true,
17
+ "dimensions": 0,
18
+ "default": null,
19
+ "generated": null,
20
+ "identity": null,
21
+ "name": "auth_sub",
22
+ "entityType": "columns",
23
+ "schema": "public",
24
+ "table": "users"
25
+ },
26
+ {
27
+ "type": "timestamp",
28
+ "typeSchema": null,
29
+ "notNull": true,
30
+ "dimensions": 0,
31
+ "default": "now()",
32
+ "generated": null,
33
+ "identity": null,
34
+ "name": "created_at",
35
+ "entityType": "columns",
36
+ "schema": "public",
37
+ "table": "users"
38
+ },
39
+ {
40
+ "type": "jsonb",
41
+ "typeSchema": null,
42
+ "notNull": false,
43
+ "dimensions": 0,
44
+ "default": "'{}'",
45
+ "generated": null,
46
+ "identity": null,
47
+ "name": "metadata",
48
+ "entityType": "columns",
49
+ "schema": "public",
50
+ "table": "users"
51
+ },
52
+ {
53
+ "columns": ["auth_sub"],
54
+ "nameExplicit": false,
55
+ "name": "users_pkey",
56
+ "schema": "public",
57
+ "table": "users",
58
+ "entityType": "pks"
59
+ }
60
+ ],
61
+ "renames": []
62
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `count_history` (
2
+ `uid` int AUTO_INCREMENT PRIMARY KEY,
3
+ `count` int NOT NULL,
4
+ `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
5
+ );
@@ -0,0 +1,61 @@
1
+ {
2
+ "version": "2",
3
+ "dialect": "singlestore",
4
+ "id": "d815e1ce-94b0-4fb1-8829-97431461c2b8",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "count_history",
9
+ "entityType": "tables"
10
+ },
11
+ {
12
+ "type": "int",
13
+ "notNull": true,
14
+ "autoIncrement": true,
15
+ "default": null,
16
+ "onUpdateNow": false,
17
+ "onUpdateNowFsp": null,
18
+ "charSet": null,
19
+ "collation": null,
20
+ "generated": null,
21
+ "name": "uid",
22
+ "entityType": "columns",
23
+ "table": "count_history"
24
+ },
25
+ {
26
+ "type": "int",
27
+ "notNull": true,
28
+ "autoIncrement": false,
29
+ "default": null,
30
+ "onUpdateNow": false,
31
+ "onUpdateNowFsp": null,
32
+ "charSet": null,
33
+ "collation": null,
34
+ "generated": null,
35
+ "name": "count",
36
+ "entityType": "columns",
37
+ "table": "count_history"
38
+ },
39
+ {
40
+ "type": "timestamp",
41
+ "notNull": true,
42
+ "autoIncrement": false,
43
+ "default": "CURRENT_TIMESTAMP",
44
+ "onUpdateNow": false,
45
+ "onUpdateNowFsp": null,
46
+ "charSet": null,
47
+ "collation": null,
48
+ "generated": null,
49
+ "name": "created_at",
50
+ "entityType": "columns",
51
+ "table": "count_history"
52
+ },
53
+ {
54
+ "columns": ["uid"],
55
+ "name": "PRIMARY",
56
+ "table": "count_history",
57
+ "entityType": "pks"
58
+ }
59
+ ],
60
+ "renames": []
61
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `users` (
2
+ `auth_sub` varchar(255) PRIMARY KEY,
3
+ `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
4
+ `metadata` json DEFAULT '{}'
5
+ );
@@ -0,0 +1,61 @@
1
+ {
2
+ "version": "2",
3
+ "dialect": "singlestore",
4
+ "id": "c077064e-71dd-4939-9b88-0f3c07d67857",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "users",
9
+ "entityType": "tables"
10
+ },
11
+ {
12
+ "type": "varchar(255)",
13
+ "notNull": true,
14
+ "autoIncrement": false,
15
+ "default": null,
16
+ "onUpdateNow": false,
17
+ "onUpdateNowFsp": null,
18
+ "charSet": null,
19
+ "collation": null,
20
+ "generated": null,
21
+ "name": "auth_sub",
22
+ "entityType": "columns",
23
+ "table": "users"
24
+ },
25
+ {
26
+ "type": "timestamp",
27
+ "notNull": true,
28
+ "autoIncrement": false,
29
+ "default": "CURRENT_TIMESTAMP",
30
+ "onUpdateNow": false,
31
+ "onUpdateNowFsp": null,
32
+ "charSet": null,
33
+ "collation": null,
34
+ "generated": null,
35
+ "name": "created_at",
36
+ "entityType": "columns",
37
+ "table": "users"
38
+ },
39
+ {
40
+ "type": "json",
41
+ "notNull": false,
42
+ "autoIncrement": false,
43
+ "default": "'{}'",
44
+ "onUpdateNow": false,
45
+ "onUpdateNowFsp": null,
46
+ "charSet": null,
47
+ "collation": null,
48
+ "generated": null,
49
+ "name": "metadata",
50
+ "entityType": "columns",
51
+ "table": "users"
52
+ },
53
+ {
54
+ "columns": ["auth_sub"],
55
+ "name": "PRIMARY",
56
+ "table": "users",
57
+ "entityType": "pks"
58
+ }
59
+ ],
60
+ "renames": []
61
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `count_history` (
2
+ `uid` integer PRIMARY KEY AUTOINCREMENT,
3
+ `count` integer NOT NULL,
4
+ `created_at` integer DEFAULT ((julianday('now') - 2440587.5) * 86400000) NOT NULL
5
+ );
@@ -0,0 +1,50 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "id": "6622a331-77bf-4d4e-88f4-49c5160639c6",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "count_history",
9
+ "entityType": "tables"
10
+ },
11
+ {
12
+ "type": "integer",
13
+ "notNull": false,
14
+ "autoincrement": true,
15
+ "default": null,
16
+ "generated": null,
17
+ "name": "uid",
18
+ "entityType": "columns",
19
+ "table": "count_history"
20
+ },
21
+ {
22
+ "type": "integer",
23
+ "notNull": true,
24
+ "autoincrement": false,
25
+ "default": null,
26
+ "generated": null,
27
+ "name": "count",
28
+ "entityType": "columns",
29
+ "table": "count_history"
30
+ },
31
+ {
32
+ "type": "integer",
33
+ "notNull": true,
34
+ "autoincrement": false,
35
+ "default": "((julianday('now') - 2440587.5) * 86400000)",
36
+ "generated": null,
37
+ "name": "created_at",
38
+ "entityType": "columns",
39
+ "table": "count_history"
40
+ },
41
+ {
42
+ "columns": ["uid"],
43
+ "nameExplicit": false,
44
+ "name": "count_history_pk",
45
+ "table": "count_history",
46
+ "entityType": "pks"
47
+ }
48
+ ],
49
+ "renames": []
50
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `users` (
2
+ `auth_sub` text PRIMARY KEY,
3
+ `created_at` integer DEFAULT ((julianday('now') - 2440587.5) * 86400000) NOT NULL,
4
+ `metadata` text DEFAULT '{}'
5
+ );
@@ -0,0 +1,50 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "id": "7f63cb6e-0782-48bf-afbe-2487419620f0",
5
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
6
+ "ddl": [
7
+ {
8
+ "name": "users",
9
+ "entityType": "tables"
10
+ },
11
+ {
12
+ "type": "text",
13
+ "notNull": false,
14
+ "autoincrement": false,
15
+ "default": null,
16
+ "generated": null,
17
+ "name": "auth_sub",
18
+ "entityType": "columns",
19
+ "table": "users"
20
+ },
21
+ {
22
+ "type": "integer",
23
+ "notNull": true,
24
+ "autoincrement": false,
25
+ "default": "((julianday('now') - 2440587.5) * 86400000)",
26
+ "generated": null,
27
+ "name": "created_at",
28
+ "entityType": "columns",
29
+ "table": "users"
30
+ },
31
+ {
32
+ "type": "text",
33
+ "notNull": false,
34
+ "autoincrement": false,
35
+ "default": "'{}'",
36
+ "generated": null,
37
+ "name": "metadata",
38
+ "entityType": "columns",
39
+ "table": "users"
40
+ },
41
+ {
42
+ "columns": ["auth_sub"],
43
+ "nameExplicit": false,
44
+ "name": "users_pk",
45
+ "table": "users",
46
+ "entityType": "pks"
47
+ }
48
+ ],
49
+ "renames": []
50
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `count_history` (
2
+ `uid` integer PRIMARY KEY AUTOINCREMENT,
3
+ `count` integer NOT NULL,
4
+ `created_at` integer DEFAULT ((julianday('now') - 2440587.5) * 86400000) NOT NULL
5
+ );