Skip to content

Commit

Permalink
Include migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Bozzo authored and Lucas Bozzo committed Apr 28, 2024
1 parent 766c3de commit 774bd93
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 0 deletions.
16 changes: 16 additions & 0 deletions migrations/0002_daily_mercury.sql
Original file line number Diff line number Diff line change
@@ -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
*/
83 changes: 83 additions & 0 deletions migrations/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
7 changes: 7 additions & 0 deletions migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}

0 comments on commit 774bd93

Please sign in to comment.