File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1680,8 +1680,16 @@ export class CloudflareD1DB implements FeedbackFlowDB {
16801680 messages . push ( 'Upgraded schema from version 1 to version 2' ) ;
16811681 }
16821682
1683+ // Migration to version 3 if needed (only if already at version 2)
1684+ if ( version . version === 2 ) {
1685+ const migrationSQLModule = await import ( './migrations/v3_add_links_table.sql' ) ;
1686+ const migrationSQL = migrationSQLModule . default ;
1687+ await this . db . exec ( migrationSQL ) ;
1688+ messages . push ( 'Upgraded schema from version 2 to version 3' ) ;
1689+ }
1690+
16831691 // If schema is already up to date
1684- if ( version . version >= 2 ) {
1692+ if ( version . version >= 3 ) {
16851693 messages . push ( `Schema is up to date (version ${ version . version } )` ) ;
16861694 }
16871695 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments