File tree Expand file tree Collapse file tree 2 files changed +7
-19
lines changed
lib/services/storage/migrations Expand file tree Collapse file tree 2 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -127,24 +127,12 @@ export async function runMigrations() {
127127 if ( executed . has ( m . name ) ) {
128128 const prev = executed . get ( m . name ) ;
129129 if ( prev !== checksum ) {
130- const allow = ( process . env . MIGRATION_ALLOW_CHECKSUM_UPDATE || '' ) . toLowerCase ( ) ;
131- const allowUpdate = allow === '1' || allow === 'true' || allow === 'yes' ;
132- if ( allowUpdate ) {
133- logger . warn (
134- `Checksum mismatch for already executed migration ${ m . name } , but MIGRATION_ALLOW_CHECKSUM_UPDATE is enabled. ` +
135- `Updating recorded checksum and continuing without re-running the migration.` ,
136- ) ;
137- SqliteConnection . execute ( 'UPDATE schema_migrations SET checksum = @checksum WHERE name = @name' , {
138- checksum,
139- name : m . name ,
140- } ) ;
141- executed . set ( m . name , checksum ) ;
142- } else {
143- throw new Error (
144- `Checksum mismatch for already executed migration ${ m . name } . ` +
145- `Do not modify applied migrations. Create a new migration instead.` ,
146- ) ;
147- }
130+ logger . info ( `Mismatch found in migration ${ m . name } . Fixing.` ) ;
131+ SqliteConnection . execute ( 'UPDATE schema_migrations SET checksum = @checksum WHERE name = @name' , {
132+ checksum,
133+ name : m . name ,
134+ } ) ;
135+ executed . set ( m . name , checksum ) ;
148136 }
149137 continue ;
150138 }
Original file line number Diff line number Diff line change 11{
22 "name" : " fredy" ,
3- "version" : " 12.0.1 " ,
3+ "version" : " 12.0.2 " ,
44 "description" : " [F]ind [R]eal [E]states [d]amn eas[y]." ,
55 "scripts" : {
66 "prepare" : " husky" ,
You can’t perform that action at this time.
0 commit comments