Skip to content

Commit

Permalink
fix: handle schema removals
Browse files Browse the repository at this point in the history
fixes #237
  • Loading branch information
macjuul committed Apr 27, 2024
1 parent 1d3f29e commit 31a5a2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util/schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ export async function syncDatabaseSchema(options?: SchemaSyncOptions) {
const table = dbInfo.tables.find(t => t.name === tableName)!;
const index = schema.tables.findIndex(t => t.schema.name === tableName);

if (!table) {
schema.tables.splice(index, 1);
continue;
}

const definition: TableInfo = {
schema: {
...table,
Expand Down

0 comments on commit 31a5a2d

Please sign in to comment.