sold
This commit is contained in:
@@ -31,6 +31,20 @@ async function runMigrations() {
|
||||
END $$;
|
||||
`)
|
||||
|
||||
await query(`
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'blog_posts'
|
||||
AND column_name = 'is_sold'
|
||||
) THEN
|
||||
ALTER TABLE blog_posts ADD COLUMN is_sold BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
END IF;
|
||||
END $$;
|
||||
`)
|
||||
|
||||
await query(`
|
||||
CREATE OR REPLACE FUNCTION set_updated_at()
|
||||
RETURNS TRIGGER AS $$
|
||||
|
||||
Reference in New Issue
Block a user