Skip to content

v0.3.8

Compare
Choose a tag to compare
@a8m a8m released this 11 May 14:07
· 1828 commits to master since this release
0654c4d

Atlas v0.3.8 is a patch release that includes many small improvements to the Atlas CLI.

Installation

MacOS

curl -LO https://release.ariga.io/atlas/atlas-darwin-amd64-v0.3.8
chmod +x ./atlas-darwin-amd64-v0.3.8
sudo mv ./atlas-darwin-amd64-v0.3.8 /usr/local/bin/atlas
sudo chown root: /usr/local/bin/atlas

Linux

curl -LO https://release.ariga.io/atlas/atlas-linux-amd64-v0.3.8
sudo install -o root -g root -m 0755 ./atlas-linux-amd64-v0.3.8 /usr/local/bin/atlas

Windows

Download

Docker

docker pull arigaio/atlas:0.3.8
docker run --rm -p 5800:5800 arigaio/atlas:0.3.8

New Features

Atlas DDL

This version includes several new features:

Generated Columns - Following requests from our community, we added support for generated columns in MySQL, PostgreSQL, and SQLite. Generated columns are columns whose values are computed using other columns or by deterministic expressions. Click here to see examples on how to implement these columns.

Partitions - Another requested feature from our community was support for partitioned tables in PostgreSQL. In this version, we added support for PostgreSQL only, but are planning on adding support for the remaining dialects in the future. Table partitioning refers to splitting large, logical tables into smaller, physical ones. To view an example of how to implement partitions, click here.

Input variables - We added support for input variables to allow reusing an Atlas schema in multi-environment architecture. This is especially useful when the database schema is replicated per tenant. Once input variables are defined, their value can be referenced and passed on in the schema apply command using the --var flag. Read more about input variables here.

What's Changed

  • sql/postgres: respect case sensitive names for schema resources by @a8m in #638
  • cmd/action: add migrate diff command by @masseelch in #636
  • doc/website: add a page for dev-database / twin-environment by @a8m in #640
  • doc/sql: document index expressions and partial indexes by @a8m in #641
  • sql/mysql: add support for index prefixes by @a8m in #642
  • doc/md: documenting creation of encryption keys by @rotemtam in #643
  • doc/website: mysql and maria index prefixes by @a8m in #644
  • doc/md: remove redundant paragraph from encryption section by @rotemtam in #645
  • sql: introduce schema.Locker by @a8m in #646
  • sql/postgres: implement schema.Locker by @a8m in #648
  • sql/tidb: working ent integration tests by @hedwigz in #604
  • cmd/action: migrate tests by @masseelch in #649
  • internal/integration: add tests for pg enums with default values by @a8m in #652
  • internal/integration: add tests for columns with default values by @a8m in #653
  • internal/docker: docker client to spin up containers on the fly by @masseelch in #651
  • cmd/action: make sure to close database connections by @masseelch in #654
  • cmd/action: keep same comment format by @masseelch in #655
  • internal/integration: speed up test execution by @masseelch in #656
  • cmd/action: add user explanation when checksum mismatch occur by @masseelch in #658
  • cmd/action: fix data race issue in test by @a8m in #660
  • cmd/action: add migrate validate command to check migration integrity… by @masseelch in #659
  • cmd/action: tests for atlas migrate validate command by @masseelch in #661
  • doc/md: add TiDB to various docs by @hedwigz in #650
  • cmd/action: add atlas migrate hash command to solve checksum mismatches by @masseelch in #662
  • sql/migrate: GlobStateReader will now try to get a lock before replay… by @masseelch in #663
  • sql/postgres: add missing comma in column changes for reverse changes in Postgres by @tprebs in #668
  • sql/internal/sqlx: keep table self references on plan by @a8m in #669
  • Update UI docs by @hilakashai in #670
  • doc/md: replacing mysql dsn with urls by @rotemtam in #671
  • cmd/action: add docker provider by @masseelch in #665
  • schema/schemaspec: adding qualifier label to blocks by @rotemtam in #672
  • schema/schemaspec: marshal qualifers by @rotemtam in #673
  • schema/schemaspec: support refs for qualified resources by @rotemtam in #674
  • sql/postgres: correctly return nil realm if there are no schemas in t… by @masseelch in #675
  • cmd/action: add MariaDB and PostgreSQL support for docker driver by @masseelch in #676
  • cmd/action: add --verbose flag to apply command and document docker driver by @masseelch in #678
  • sql/internal/specutil: support references to qualified tables by @rotemtam in #677
  • sql/migrate: harden atlas.sum file integrity by @masseelch in #681
  • sql: qualify tables with duplicate names when marshaling by @rotemtam in #679
  • .github/workflows: fix ci by @rotemtam in #683
  • doc/md/ddl: document qualified tables by @rotemtam in #685
  • sql/postgres: use native pg time types by @a8m in #686
  • sql/postgres: fix the way time with(out) precision are parsed by @a8m in #687
  • sql/schema: use pointer for time precision by @a8m in #690
  • sql/schema: add support for controlling the amount/depth of inspection by @a8m in #692
  • sql/migrate: golang-migrate and goose support by @masseelch in #693
  • internal/tool: add templates for flyway compatible migration files by @masseelch in #694
  • internal/tool: add templates for liquibase compatible migration files by @masseelch in #696
  • internal/tool: no need for constructors by @masseelch in #697
  • sql/tool: export internal/tool for availability in other packages by @masseelch in #698
  • sql/mysql: support inspecting and applying generated columns by @a8m in #699
  • sql/internal/specutil: support input variables by @rotemtam in #700
  • sql/mysql: support marshaling generated columns by @a8m in #701
  • sql/mysql: support unmarshaling generated columns by @a8m in #703
  • sql/migrate: local files can be created with read permissions for eve… by @masseelch in #702
  • sql/migrate: local-directory does not create a directory if it does n… by @masseelch in #705
  • internal/types: move typeregistry outside sql by @rotemtam in #704
  • internal/integration: initial testscripts for mysql generated columns by @a8m in #706
  • schema/schemaspec/schemahcl: handle input variables by @rotemtam in #707
  • internal/integration: add tests for comparing inspected generated columns by @a8m in #708
  • sql/mysql: support diffing generated columns by @a8m in #710
  • sql/mysql: improve alter table generation by @a8m in #712
  • sql/mysql: simplify alter table function by @a8m in #713
  • sql/mysql: apply changes to generated columns by @a8m in #716
  • internal/integration: add testscript cases for generated columns changes by @a8m in #717
  • sql/postgres: fixed invalid postgres DSN by @svstanev in #714
  • sql/postgres: marshal spec duplicate enum entries by @svstanev in #718
  • sql/postgres: inspect generated expresion attribute for columns by @a8m in #719
  • sql/postgres: apply generate columns for new columns by @a8m in #721
  • sql/postgres: support (un)marshal generated columns by @a8m in #723
  • schema/schemaspec: support defining resource names as attr by @rotemtam in #720
  • sql/postgres: fixed inspection of multicolumn indexes by @svstanev in #715
  • sql/postgres: support dropping generate expressions by @a8m in #722
  • internal/integration: add testscript for postgres generated columns by @a8m in #724
  • sql/sqlite: support inspecting generated columns by @a8m in #726
  • sql/sqlite: finish generated columns implementation by @a8m in #727
  • internal/integration: add testscript for sqlite generated columns by @a8m in #728
  • cmd/action: correctly handle mysql schema name in url format by @a8m in #729
  • sql: add support for renaming resources (tables, columns and indexes) by @a8m in #731
  • sql/schema: add helper methods for working with changesets by @a8m in #732
  • sql: minor RENAME COLUMN fixes in ent integration by @a8m in #734
  • doc: add examples for generated columns by @a8m in #735
  • sql/tidb: add tidb 6 to integration tests by @hedwigz in #733
  • sql/migrate: interfaces for migration execution by @masseelch in #730
  • sql/migrate: default Scanner implementation by @masseelch in #736
  • schema/schemaspec/schemahcl: state eval with input vars by @rotemtam in #737
  • sql: adding eval method to drivers by @rotemtam in #739
  • ci status by @a8m in #743
  • sql/sqlclient: initial work for sqlclient by @a8m in #742
  • sql/sqlclient: use schemahacl.Eval by @rotemtam in #745
  • sql/sqlclient: move url parsing logic to drivers by @a8m in #748
  • sql/mysql: Ent based RevisionReadWriter implementation for mysql by @masseelch in #750
  • cmd/internal: move docker client to internal package by @a8m in #749
  • cmd/atlascmd: minor style fixes and rename action package to atlascmd by @a8m in #753
  • doc/website: mv dev db doc by @hedwigz in #756
  • sql/postgres: ent based revisions for postgres by @masseelch in #752
  • sql/migrate: support Ent revisions in SQLite and TiDB by @masseelch in #757
  • sql/migrate: refactor by @masseelch in #758
  • doc: add website legal and remove coming soon with versioned migrations by @rotemtam in #760
  • schema/schemaspec/schemahcl: patch references to blocks with variable names by @rotemtam in #754
  • sql/migrate: unit tests for executor by @masseelch in #762
  • cmd/atlascmd: add support for input vars on apply by @rotemtam in #763
  • doc/website: add blog page by @hedwigz in #759
  • doc: document input variables usage by @rotemtam in #764
  • sql/postgres: support inspecting partitioned tables by @a8m in #766
  • sql/postgres: add support for diffing partitioned tables by @a8m in #767
  • sql/postgres: allow creating partitioned tables by @a8m in #768
  • sql/postgres: support unmarshaling partitions by @a8m in #769
  • sql/postgres: support marashaling partitioned tables by @a8m in #770
  • cmd/atlascmd: add atlas migrate new command to create an empty migrat… by @masseelch in #772
  • internal/integration: testscript partitioned tables by @a8m in #774
  • cmd/atlascmd: migrate commands support format flag to spedify which t… by @masseelch in #773
  • doc/sql: add partitioned tables by @a8m in #775
  • all: minor bug fixes before release by @a8m in #777
  • cmd/atlascmd: rename env cmd by @rotemtam in #778

New Contributors

Full Changelog: v0.3.7...v0.3.8