Skip to content

Commit

Permalink
chore(weave): Fix migrations for create or replace views
Browse files Browse the repository at this point in the history
  • Loading branch information
tssweeney authored Feb 25, 2025
1 parent 1865442 commit 555d401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion weave/trace_server/migrations/002_add_deleted_at.down.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ This migration undoes adding the `deleted_at` column to:

ALTER TABLE object_versions DROP COLUMN deleted_at;

CREATE OR REPLACE VIEW object_versions_deduped as
DROP VIEW object_versions_deduped;
CREATE VIEW object_versions_deduped as
SELECT project_id,
object_id,
created_at,
Expand Down
3 changes: 2 additions & 1 deletion weave/trace_server/migrations/002_add_deleted_at.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ This migration adds:
ALTER TABLE object_versions
ADD COLUMN deleted_at Nullable(DateTime64(3)) DEFAULT NULL;

CREATE OR REPLACE VIEW object_versions_deduped as
DROP VIEW object_versions_deduped;
CREATE VIEW object_versions_deduped as
SELECT project_id,
object_id,
created_at,
Expand Down

0 comments on commit 555d401

Please sign in to comment.