Skip to content

Commit c08187f

Browse files
committed
db: Drop constraint on lovelace database type
This is a workaround fix for: #351 This fix will not require the database to be re-synced, but will result in some invalid values for the 'fixed_cost' field of the 'pool_update' table being display as negative value. The constraint will be droppped only if it exists (eg someone had previously dropped in manually).
1 parent 1c61b97 commit c08187f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CREATE FUNCTION migrate() RETURNS void AS $$
2+
3+
BEGIN
4+
EXECUTE 'ALTER DOMAIN lovelace DROP CONSTRAINT IF EXISTS lovelace_check; ';
5+
END;
6+
7+
$$ LANGUAGE plpgsql;
8+
9+
SELECT migrate();
10+
11+
DROP FUNCTION migrate();

0 commit comments

Comments
 (0)