ci: corregir sintaxis del smoke de migraciones
This commit is contained in:
@@ -91,25 +91,25 @@ jobs:
|
|||||||
GRANT CONNECT ON DATABASE dhv2_ci TO dhv2_app;
|
GRANT CONNECT ON DATABASE dhv2_ci TO dhv2_app;
|
||||||
GRANT USAGE ON SCHEMA public TO dhv2_app;
|
GRANT USAGE ON SCHEMA public TO dhv2_app;
|
||||||
|
|
||||||
-- ResetProductionOperationalData was an intentionally late, one-time
|
-- This reset was a one-time late production operation. It is marked as
|
||||||
-- production operation with an older timestamp. On a clean CI database
|
-- executed on the clean CI database so the historical schema can be
|
||||||
-- it must be considered already executed; otherwise it would run before
|
-- constructed chronologically without running that production-only wipe.
|
||||||
-- structural migrations that existed in production when the reset ran.
|
|
||||||
CREATE TABLE IF NOT EXISTS typeorm_migrations (
|
CREATE TABLE IF NOT EXISTS typeorm_migrations (
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
timestamp bigint NOT NULL,
|
timestamp bigint NOT NULL,
|
||||||
name varchar NOT NULL
|
name varchar NOT NULL
|
||||||
);
|
);
|
||||||
INSERT INTO typeorm_migrations (timestamp,name)
|
INSERT INTO typeorm_migrations (timestamp,name)
|
||||||
VALUES (1788652800000,'ResetProductionOperationalData1788652800000')
|
VALUES (1788652800000,'ResetProductionOperationalData1788652800000');
|
||||||
ON CONFLICT DO NOTHING;
|
|
||||||
SQL
|
SQL
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- name: Run every pending migration
|
- name: Run every pending migration
|
||||||
run: npm run migration:run
|
run: npm run migration:run
|
||||||
- name: Assert no pending migrations
|
- name: Assert no pending migrations
|
||||||
run: npm run migration:show | tee /tmp/migrations.txt && grep -Fq 'Pending migrations: no' /tmp/migrations.txt
|
run: |
|
||||||
|
npm run migration:show | tee /tmp/migrations.txt
|
||||||
|
grep -Fq 'Pending migrations: no' /tmp/migrations.txt
|
||||||
- name: Assert F2.2.1 reference import
|
- name: Assert F2.2.1 reference import
|
||||||
env:
|
env:
|
||||||
PGPASSWORD: owner_test_password
|
PGPASSWORD: owner_test_password
|
||||||
|
|||||||
Reference in New Issue
Block a user