Skip to content

Commit

Permalink
Use new migration generation
Browse files Browse the repository at this point in the history
  • Loading branch information
LA1CH3 committed May 13, 2024
1 parent 63e00fa commit 75289fc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 21 deletions.
4 changes: 1 addition & 3 deletions migrations/0002_bouncy_justin_hammer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
Due to that we don't generate migration automatically and it has to be done manually
*/--> statement-breakpoint
ALTER TABLE users ADD `salt` text NOT NULL;--> statement-breakpoint
CREATE UNIQUE INDEX `books_title_unique` ON `books` (`title`);--> statement-breakpoint
CREATE UNIQUE INDEX `users_username_unique` ON `users` (`username`);
ALTER TABLE users ADD `salt` text NOT NULL;--> statement-breakpoint
11 changes: 5 additions & 6 deletions migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"version": "5",
"version": "6",
"dialect": "sqlite",
"id": "a095d998-81d8-4b31-91d1-58d9856fa4a4",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"books": {
"name": "books",
Expand Down Expand Up @@ -44,8 +42,9 @@
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}
},
"id": "a095d998-81d8-4b31-91d1-58d9856fa4a4",
"prevId": "00000000-0000-0000-0000-000000000000"
}
11 changes: 5 additions & 6 deletions migrations/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"version": "5",
"version": "6",
"dialect": "sqlite",
"id": "268c96e7-a7a4-4d92-9e2b-13fafcc44a40",
"prevId": "a095d998-81d8-4b31-91d1-58d9856fa4a4",
"tables": {
"books": {
"name": "books",
Expand Down Expand Up @@ -74,8 +72,9 @@
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}
},
"id": "268c96e7-a7a4-4d92-9e2b-13fafcc44a40",
"prevId": "a095d998-81d8-4b31-91d1-58d9856fa4a4"
}
9 changes: 4 additions & 5 deletions migrations/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"version": "5",
"version": "6",
"dialect": "sqlite",
"id": "10dfad9b-8d29-48e3-96ce-16774c3aa5f4",
"prevId": "268c96e7-a7a4-4d92-9e2b-13fafcc44a40",
"tables": {
"books": {
"name": "books",
Expand Down Expand Up @@ -97,8 +95,9 @@
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
},
"id": "10dfad9b-8d29-48e3-96ce-16774c3aa5f4",
"prevId": "268c96e7-a7a4-4d92-9e2b-13fafcc44a40"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"format:write": "prettier . --write",
"cf-typegen": "wrangler types",
"db:update": "drizzle-kit up",
"db:migrate:create": "drizzle-kit generate:sqlite",
"db:migrate:create": "drizzle-kit generate",
"db:migrate:apply:local": "dotenvx run -f .env.local -- sh scripts/db-migrate.sh",
"db:migrate:apply:prod": "dotenvx run -f .env.prod -- sh scripts/db-migrate-prod.sh",
"db:studio:local": "LOCAL_DB_PATH=$(find .wrangler/state/v3/d1/miniflare-D1DatabaseObject -type f -name '*.sqlite' -print -quit) drizzle-kit studio",
Expand Down

0 comments on commit 75289fc

Please sign in to comment.