Skip to content

Commit 2b4b6be

Browse files
committed
Make view migration idempotent
Fixes #1801
1 parent f15a4c8 commit 2b4b6be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

schema/migration-3-0001-20190816.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
-- A utxo view which shows all unspent transaction outputs including the un-redeemed redeem
1010
-- addresses.
11-
create view utxo_byron_view as select
11+
create or replace view utxo_byron_view as select
1212
tx_out.*
1313
from tx_out left outer join tx_in
1414
on tx_out.tx_id = tx_in.tx_out_id and tx_out.index = tx_in.tx_out_index
@@ -19,7 +19,7 @@ create view utxo_byron_view as select
1919
-- addresses.
2020
-- This should produce the same query results as the above `utxo_byron_view` for Shelley addresses
2121
-- and non-redeem Byron addresses.
22-
create view utxo_view as select
22+
create or replace view utxo_view as select
2323
tx_out.*
2424
from tx_out
2525
left outer join tx_in on tx_out.tx_id = tx_in.tx_out_id and tx_out.index = tx_in.tx_out_index

0 commit comments

Comments
 (0)