Выполнение lab4 на 4

This commit is contained in:
Daria0w0
2026-11-06 17:35:48 +03:00
parent 9197e151ba
commit 879463c947
89 changed files with 5551 additions and 108 deletions
+36
View File
@@ -35,4 +35,40 @@ SELECT EXISTS (
INSERT INTO schema_migrations (version) VALUES (2);
\endif
SELECT EXISTS (
SELECT 1 FROM schema_migrations WHERE version = 3
) AS attachments_applied \gset
\if :attachments_applied
\echo 'Migration 000003 already applied; skipping.'
\else
\ir 000003_attachments.up.sql
INSERT INTO schema_migrations (version) VALUES (3);
\echo 'Migration 000003 applied (commit follows).'
\endif
SELECT EXISTS (
SELECT 1 FROM schema_migrations WHERE version = 4
) AS attachment_messages_applied \gset
\if :attachment_messages_applied
\echo 'Migration 000004 already applied; skipping.'
\else
\ir 000004_attachment_messages.up.sql
INSERT INTO schema_migrations (version) VALUES (4);
\echo 'Migration 000004 applied (commit follows).'
\endif
SELECT EXISTS (
SELECT 1 FROM schema_migrations WHERE version = 5
) AS upload_intents_applied \gset
\if :upload_intents_applied
\echo 'Migration 000005 already applied; skipping.'
\else
\ir 000005_upload_intents.up.sql
INSERT INTO schema_migrations (version) VALUES (5);
\echo 'Migration 000005 applied (commit follows).'
\endif
COMMIT;