File tree Expand file tree Collapse file tree 5 files changed +21
-2
lines changed
pkg/data/ent/migrate/migrations Expand file tree Collapse file tree 5 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ migration_apply: check-atlas-tool migration_hash
3636.PHONY : migration_sync
3737# sync migration files with the current ent schema
3838migration_sync : check-atlas-tool migration_hash
39- atlas migrate diff --dir ${local_migrations_dir} --to " ent://pkg/data/ent/schema" --dev-url " docker://postgres/15/test?search_path=public"
39+ atlas migrate diff --dir ${local_migrations_dir} --to " ent://pkg/data/ent/schema" --dev-url " docker://postgres/15/test?search_path=public" --config file://atlas.hcl --env dev
40+
41+ migration_lint : check-atlas-tool migration_hash
42+ atlas migrate lint --dir ${local_migrations_dir} --dev-url " docker://postgres/15/test?search_path=public" --latest 1 --config file://atlas.hcl --env dev
4043
4144.PHONY : migration_new
4245# generate an empty migration file
Original file line number Diff line number Diff line change 1+ # do not add automatically foreign keys to the generated migrations
2+ env "dev" {
3+ diff {
4+ skip {
5+ add_foreign_key = true
6+ }
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ -- remove constraints for performance reasons
2+ ALTER TABLE public .workflow_run_cas_backends DROP CONSTRAINT workflow_run_cas_backends_workflow_run_id;
3+ ALTER TABLE public .workflow_run_cas_backends DROP CONSTRAINT workflow_run_cas_backends_cas_backend_id;
Original file line number Diff line number Diff line change 1+ -- remove for performance reasons
2+ ALTER TABLE cas_mappings DROP CONSTRAINT cas_mappings_cas_backends_cas_backend;
3+ ALTER TABLE cas_mappings DROP CONSTRAINT cas_mappings_organizations_organization;
Original file line number Diff line number Diff line change 1- h1:J//lNzTG1omhRdZO5iV295VWI2N70PBO9u1SqN2Pxj0 =
1+ h1:cd7peHu3MdqEo1c6vGrDGeDjSLGEFrPqrrEiSMDZJp0 =
2220230706165452_init-schema.sql h1:VvqbNFEQnCvUVyj2iDYVQQxDM0+sSXqocpt/5H64k8M=
3320230710111950-cas-backend.sql h1:A8iBuSzZIEbdsv9ipBtscZQuaBp3V5/VMw7eZH6GX+g=
4420230712094107-cas-backends-workflow-runs.sql h1:a5rzxpVGyd56nLRSsKrmCFc9sebg65RWzLghKHh5xvI=
@@ -67,3 +67,5 @@ h1:J//lNzTG1omhRdZO5iV295VWI2N70PBO9u1SqN2Pxj0=
676720241122101039.sql h1:RMk8MDWj/RhbVKX9ERHEI96tFFPuMEwNZMk65FanOvM=
686820241123161902.sql h1:Nm0Szr+lGbXWCE6KS8aIsd2mz2GadWOuF36o2uHaT70=
696920241123163942.sql h1:s+ImKf84B5s3Hp9Q7ILTcbNkQFIveZapu8fSe3X0eLY=
70+ 20241126164629.sql h1:TrYF9F2RmBUVVB/9a3XFlintq94b2/BaJLYjv80TXOQ=
71+ 20241126182209.sql h1:01eeRbQxKYsjhEvafp1fL4kYJx4NoidwjcxWbWLlNak=
You can’t perform that action at this time.
0 commit comments