Skip to content

v0.16.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 08:27
· 1346 commits to master since this release
91e28d4

Upgrade notes

Native ptah asks before running a program a project file names. Ptah 0.15 ran a ptah.yaml migration.pre_up_hook or migration.pre_down_hook, and an atlas.hcl data "external", without asking. From 0.16.0, native ptah refuses them until you pass --allow-config-exec or set PTAH_ALLOW_CONFIG_EXEC=1. A deploy job whose ptah.yaml names a hook, such as a backup, stops before it connects to the database, with nothing applied and the hook not run:

error: ptah.yaml migration.pre_up_hook runs sh: a program named in a project file does not run without permission; pass --allow-config-exec to run it

Add --allow-config-exec or PTAH_ALLOW_CONFIG_EXEC=1 to that job. --allow-external-schema and PTAH_ALLOW_EXTERNAL_SCHEMA do not cover hooks. A hook passed on the command line as --pre-up-hook or PTAH_PRE_UP_HOOK runs without the permission, as before. ptah-compat runs atlas.hcl programs as Atlas does and needs no flag. See Programs a project file names.

Warnings about many objects are one line per kind. A run reports the names a PostgreSQL-family server cuts to 63 bytes, the atlas.hcl settings Atlas compatibility ignores, the schema-file constructs that are dropped, and the SQL files atlas.sum does not cover once each, after the command's output, with how many objects each concerns. One object is still printed as its own line. PTAH_LOG_LEVEL=debug lists the objects, and PTAH_LOG_FORMAT=json lists them as records. A script that counted the per-object lines should read the count, or the debug log.

ptah-compat migrate diff writes statements at the first column. {{ sql . " " }}, the default format, used to prefix every line with two spaces. It now indents only a statement's inner lines, as Atlas does, so new files match files Atlas wrote. Existing files and their atlas.sum entries are unchanged.

New

-- ptah:allow-not-valid CONSTRAINT <name> ON <table> in a SQL file of the desired schema allows a CHECK or foreign key that another source declares, such as an ORM's schema export, to stay NOT VALID, without declaring it again. See Allow a key another source declares to stay NOT VALID.

Changelog

  • 4a0d18c Accept ADR 0026 (#4871)
  • 8506744 Add row, seed and dev-database services to the provider SDK (#4923)
  • f227879 Add the embedding store to the provider SDK as contract 25.2 (#4936)
  • 811b72c Alias the root import where a test names a directory root (#4940)
  • b67074d Ask a smart HTTP server for a pinned commit by its id (#4880)
  • 5c2a868 Bind a provider table directive to the table its table attribute names (#4875)
  • 2ce8bf2 Bind a saved provider plan to the release, not the executable (#4935)
  • e717436 Bundle the pinned YDB provider in every release channel (#4876)
  • 83f47bf Check codec definitions at registration and digest them on first use (#4882)
  • 455aca9 Check the YDB release lines against the ones the plugin declares (#4860)
  • 4950d3e Clean, guard and provision provider dev databases, and bound statements (#4942)
  • 5ab93b7 Compare no table or column comment on SQLite (#4915)
  • e85d2a8 Compare two databases in schema diff on the --from server (#4893)
  • cbf1864 Count each kind of object on both sides in the drift report (#4901)
  • a641073 Create the revision table under the migration lock in migrations up (#4813)
  • bd833bb Delete host YDB code after the default flips to the plugin (#4847)
  • 55c3337 Document provider-sdk tags and ignore local go.work (#4870)
  • d22c5bf Document that native ptah asks before running a ptah.yaml hook (#4925)
  • 0300fba Expect ptah-compat to run a plan test's external step as Atlas does (#4943)
  • d01d71e Give a gate no verdict in a run a newer one canceled (#4889)
  • add73d2 Give the provider SDK handshake test a path absolute on Windows (#4931)
  • 218669b Install official providers separately, without pins or a bundle (#4926)
  • 3646a30 Keep sourceformats.New compatible with v0.15.0 (#4918)
  • 67134e4 Let a provider claim the Go annotation syntax it owns (#4866)
  • 7076368 Let a provider own column and index Go directives and frontend attributes (#4873)
  • 0c676c2 Let a provider own platform properties, column values and decoded facets (#4877)
  • 515c479 Let a provider read the SQL schema documents of its own dialect (#4891)
  • f347e5f Let a schema file allow a key another source declares to stay NOT VALID (#4938)
  • f861801 Let provider schema validation pass declared rows to the data services (#4947)
  • ec0ab69 Lint a provider's SQL from the statement facts of its split (#4941)
  • 613bc75 Make ptah-compat usable on an Ent project with views and a long history (#4881)
  • ba943cb Mark superseded ADRs and record where later ADRs change earlier ones (#4919)
  • b905ea3 Move provider selection out of the native command wrapper (#4890)
  • 6bf5628 Name the pinned Atlas reference the sql indent was measured on (#4924)
  • b9e85aa Pin official provider releases and add providers install (#4872)
  • 0c180b3 Plan altered tables for providers that own the table lifecycle (#4846)
  • cde9793 Point ADR 0032 at the maintainers' rule for YDB tests (#4934)
  • 76e5fcb Propose ADRs 0027-0030 for the YDB provider move (#4884)
  • 6ef59bf Propose how official providers are pinned, installed and bundled (ADR 0026) (#4867)
  • 5c7bdfd Propose that a provider declares the source syntax it owns (ADR 0025) (#4864)
  • b54fc97 Publish the drift finding vocabulary as data (#4907)
  • 3c3002f Rate DROP VIEW, MATERIALIZED VIEW, SEQUENCE and TRIGGER as destructive (#4913)
  • 71258ce Read PostgreSQL names and CHECKs the way the server stores them (#4894)
  • 25744b2 Read a provider engine's SQL schema documents through the provider (#4895)
  • 8e4a4d7 Read awsparamstore:// URLs without linking the SDK's SSM client (#4917)
  • 2b1e6c1 Read migration.format from the env in migrate diff (#4896)
  • 497df0b Read the Go directives a provider claims (#4869)
  • f170c81 Read the interrupted command's output under a lock (#4903)
  • ee58bb9 Read the sql template indent as Atlas does (#4922)
  • 87ff587 Record that official providers are installed separately (#4916)
  • 792ca26 Record that the embedding store is a provider service (ADR 0032) (#4927)
  • c5a356e Record the maintainers' decisions on the open ADR contradictions (#4929)
  • c9c23f7 Refuse a PostgreSQL name declared again where the server refuses it (#4920)
  • 82b06cd Refuse a conditional index create over an index with another definition (#4814)
  • 398e5fe Remove the migrate diff lock file when the lock is released (#4902)
  • d27a8c8 Report warnings about many objects once per run (#4937)
  • 1c281de Report when each migration's revision row was written and how long it ran (#4888)
  • cf078bb Require provider-sdk v0.3.0 in the host and the fixture (#4930)
  • 3a26e2a Restore ADRs 0027 to 0030 and the amendments to 0024 and 0025 (#4897)
  • d084fe6 Restore ADRs 0027 to 0030 that #4888 removed (#4898)
  • 91e28d4 Retry the install record replacement while Windows holds it open (#4946)
  • 592836c Route removed tables to providers that own the table lifecycle (#4858)
  • 16563c5 Run configured programs in ptah-compat as Atlas does, and ask in native ptah (#4911)
  • f84fa09 Run ptah inference against a provider's embedding store (#4944)
  • 4a78a8d Save provider-native operations in plan files and preview without a lock (#4883)
  • ac643d5 Select the bundled or stored official provider when the manifest names none (#4874)
  • a7eb980 Serve declared rows, seed files and the query dialect through providers (#4939)
  • 5310896 Serve executable providers from ptah-compat (#4892)
  • f34e22b Serve migration lint from an executable provider (#4908)
  • cce08f7 Start the release changelog at the previous v* tag (#4928)
  • acccf42 Stop pinning the YDB plugin's release lines in the host (#4861)
  • f88d204 Test which binary runs a .test.hcl external step without asking (#4945)
  • a2e2540 Update alpine:3.24 Docker digest to be26560 (#4856)
  • e8e4f51 Update aws-sdk-go-v2 monorepo (#4848)
  • 33347d6 Update dependency @astrojs/starlight to v0.42.7 (#4868)
  • f9107c8 Update dependency goreleaser/goreleaser to v2.19.0 (#4849)
  • ada51c7 Update github.com/charmbracelet/ultraviolet digest to a45b7c8 (#4857)
  • 346611a Update module cloud.google.com/go/iam to v1.15.0 (#4850)
  • 1456e06 Update module cloud.google.com/go/longrunning to v1.4.0 (#4851)
  • e8bc780 Update module cloud.google.com/go/secretmanager to v1.23.0 (#4852)
  • a7578a6 Update module github.com/ProtonMail/go-crypto to v1.5.2 (#4854)
  • b26b933 Update module github.com/andybalholm/brotli to v1.2.7 (#4878)
  • 42e1a27 Update module github.com/dlclark/regexp2/v2 to v2.10.0 (#4932)
  • 1513ee7 Update module github.com/kevinburke/ssh_config to v1.6.0 (#4853)
  • 8106360 Update module github.com/sergi/go-diff to v1.4.0 (#4855)
  • 60c004f Update module github.com/yandex-cloud/go-genproto to v0.131.0 (#4863)
  • 96aed37 Update module google.golang.org/api to v0.308.0 (#4859)
  • 2b683d1 Update module oras.land/oras-go/v2 to v2.7.0 (#4865)
  • 2cf4a38 Update undici to 8.12.3 in the docs site lockfile (#4909)
  • d81afa8 Wait for a discarded replay session to drop its temporary tables (#4885)
  • 833863f Warn on PostgreSQL names the reader cuts, and refuse cuts that collide (#4912)
  • 7a57aea chore(deps-dev): bump dompurify (#4862)