Skip to content

Commit

Permalink
fix: no default value causing migration breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Oct 10, 2024
1 parent 5ec892d commit 386264b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
2 changes: 2 additions & 0 deletions db/migrations/0006_bored_carnage.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `model_data` ADD `file_path` text DEFAULT '' NOT NULL;--> statement-breakpoint
CREATE UNIQUE INDEX `model_data_file_path_unique` ON `model_data` (`file_path`);
2 changes: 0 additions & 2 deletions db/migrations/0006_dusty_jetstream.sql

This file was deleted.

5 changes: 3 additions & 2 deletions db/migrations/meta/0006_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "6",
"dialect": "sqlite",
"id": "39f6562f-f39f-4369-82f2-d60d5826f8b5",
"id": "28792d74-82cf-4f0d-a6a2-67b4cb8103af",
"prevId": "e32aff4c-ae11-4bd4-b10a-f2e8d48a3300",
"tables": {
"character_greetings": {
Expand Down Expand Up @@ -804,7 +804,8 @@
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
"autoincrement": false,
"default": "''"
},
"file_size": {
"name": "file_size",
Expand Down
4 changes: 2 additions & 2 deletions db/migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
{
"idx": 6,
"version": "6",
"when": 1728454112384,
"tag": "0006_dusty_jetstream",
"when": 1728559551008,
"tag": "0006_bored_carnage",
"breakpoints": true
}
]
Expand Down
37 changes: 18 additions & 19 deletions db/migrations/migrations.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo

import journal from './meta/_journal.json';
import m0000 from './0000_sudden_blockbuster.sql';
import m0001 from './0001_yellow_squirrel_girl.sql';
import m0002 from './0002_majestic_brother_voodoo.sql';
import m0003 from './0003_violet_firelord.sql';
import m0004 from './0004_small_deadpool.sql';
import m0005 from './0005_warm_microbe.sql';
import m0006 from './0006_dusty_jetstream.sql';
import journal from './meta/_journal.json'
import m0000 from './0000_sudden_blockbuster.sql'
import m0001 from './0001_yellow_squirrel_girl.sql'
import m0002 from './0002_majestic_brother_voodoo.sql'
import m0003 from './0003_violet_firelord.sql'
import m0004 from './0004_small_deadpool.sql'
import m0005 from './0005_warm_microbe.sql'
import m0006 from './0006_bored_carnage.sql'

export default {
export default {
journal,
migrations: {
m0000,
m0001,
m0002,
m0003,
m0004,
m0005,
m0006
}
}

m0000,
m0001,
m0002,
m0003,
m0004,
m0005,
m0006,
},
}

0 comments on commit 386264b

Please sign in to comment.