Skip to content

Commit

Permalink
add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
davgur committed May 31, 2021
1 parent c2dfa34 commit 7f20e27
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions migrations/2021-05-31_add_unit_source_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- MDB generated migration file
-- rambler up

WITH data(name) AS (VALUES
('SOURCE')
)
INSERT INTO content_types (name)
SELECT d.name
FROM data AS d
WHERE NOT EXISTS(SELECT ct.name
FROM content_types AS ct
WHERE ct.name = d.name);

-- rambler down

DELETE FROM content_types
WHERE name IN ('SOURCE');

0 comments on commit 7f20e27

Please sign in to comment.