fix migration break
This commit is contained in:
@@ -0,0 +1 @@
|
||||
-- Add down migration script here
|
||||
11
backend/migrations/20230524065919_fix_migration_break.up.sql
Normal file
11
backend/migrations/20230524065919_fix_migration_break.up.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Add up migration script here
|
||||
do
|
||||
$$
|
||||
BEGIN
|
||||
|
||||
IF (NOT EXISTS (SELECT workspace_id FROM script WHERE workspace_id = 'demo' UNION ALL SELECT workspace_id FROM flow WHERE workspace_id = 'demo' UNION ALL SELECT workspace_id FROM app WHERE workspace_id = 'demo'))
|
||||
THEN
|
||||
DELETE FROM workspace_invite WHERE workspace_id = 'demo';
|
||||
END IF;
|
||||
END
|
||||
$$
|
||||
@@ -99,6 +99,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
};
|
||||
|
||||
if server_mode {
|
||||
// migration code to avoid break
|
||||
windmill_api::migrate_db(&db).await?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user