From 774bd9359dc472fdfaf31ca0d859a2ea2b1fbc0e Mon Sep 17 00:00:00 2001 From: Lucas Bozzo Date: Mon, 29 Apr 2024 00:24:19 +0100 Subject: [PATCH] Include migrations --- migrations/0002_daily_mercury.sql | 16 ++++++ migrations/meta/0002_snapshot.json | 83 ++++++++++++++++++++++++++++++ migrations/meta/_journal.json | 7 +++ 3 files changed, 106 insertions(+) create mode 100644 migrations/0002_daily_mercury.sql create mode 100644 migrations/meta/0002_snapshot.json diff --git a/migrations/0002_daily_mercury.sql b/migrations/0002_daily_mercury.sql new file mode 100644 index 0000000..98fa71d --- /dev/null +++ b/migrations/0002_daily_mercury.sql @@ -0,0 +1,16 @@ +/* + SQLite does not support "Set autoincrement to a column" out of the box, we do not generate automatic migration for that, so it has to be done manually + Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php + https://www.sqlite.org/lang_altertable.html + https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3 + + Due to that we don't generate migration automatically and it has to be done manually +*/--> statement-breakpoint +/* + SQLite does not support "Changing existing column type" out of the box, we do not generate automatic migration for that, so it has to be done manually + Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php + https://www.sqlite.org/lang_altertable.html + https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3 + + Due to that we don't generate migration automatically and it has to be done manually +*/ \ No newline at end of file diff --git a/migrations/meta/0002_snapshot.json b/migrations/meta/0002_snapshot.json new file mode 100644 index 0000000..7f86ffd --- /dev/null +++ b/migrations/meta/0002_snapshot.json @@ -0,0 +1,83 @@ +{ + "version": "5", + "dialect": "sqlite", + "id": "cb0a8c8e-d9eb-42b9-8f45-d7fc17085bb8", + "prevId": "4361308a-3c5c-46cd-91d7-51faea0ac2d3", + "tables": { + "author": { + "name": "author", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "author_id_unique": { + "name": "author_id_unique", + "columns": [ + "id" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "quote": { + "name": "quote", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "quote": { + "name": "quote", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "author_id": { + "name": "author_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "quote_id_unique": { + "name": "quote_id_unique", + "columns": [ + "id" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} \ No newline at end of file diff --git a/migrations/meta/_journal.json b/migrations/meta/_journal.json index 5477f38..c1ad822 100644 --- a/migrations/meta/_journal.json +++ b/migrations/meta/_journal.json @@ -15,6 +15,13 @@ "when": 1714273363788, "tag": "0001_steady_the_twelve", "breakpoints": true + }, + { + "idx": 2, + "version": "5", + "when": 1714346618320, + "tag": "0002_daily_mercury", + "breakpoints": true } ] } \ No newline at end of file