Comparing version 2.18.0 to 2.19.0
{ | ||
"name": "dbmate", | ||
"version": "2.18.0", | ||
"version": "2.19.0", | ||
"description": "A lightweight, framework-agnostic database migration tool", | ||
@@ -27,10 +27,10 @@ "repository": "https://github.com/amacneil/dbmate", | ||
"optionalDependencies": { | ||
"@dbmate/linux-ia32": "2.18.0", | ||
"@dbmate/linux-x64": "2.18.0", | ||
"@dbmate/linux-arm": "2.18.0", | ||
"@dbmate/linux-arm64": "2.18.0", | ||
"@dbmate/darwin-x64": "2.18.0", | ||
"@dbmate/darwin-arm64": "2.18.0", | ||
"@dbmate/win32-x64": "2.18.0" | ||
"@dbmate/linux-ia32": "2.19.0", | ||
"@dbmate/linux-x64": "2.19.0", | ||
"@dbmate/linux-arm": "2.19.0", | ||
"@dbmate/linux-arm64": "2.19.0", | ||
"@dbmate/darwin-x64": "2.19.0", | ||
"@dbmate/darwin-arm64": "2.19.0", | ||
"@dbmate/win32-x64": "2.19.0" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # Dbmate | ||
It is a standalone command line tool that can be used with Go, Node.js, Python, Ruby, PHP, or any other language or framework you are using to write database-backed applications. This is especially helpful if you are writing multiple services in different languages, and want to maintain some sanity with consistent development tools. | ||
It is a standalone command line tool that can be used with Go, Node.js, Python, Ruby, PHP, Rust, C++, or any other language or framework you are using to write database-backed applications. This is especially helpful if you are writing multiple services in different languages, and want to maintain some sanity with consistent development tools. | ||
@@ -27,2 +27,3 @@ For a comparison between dbmate and other popular database schema migration tools, please see [Alternatives](#alternatives). | ||
- [BigQuery](#bigquery) | ||
- [Spanner](#spanner) | ||
- [Creating Migrations](#creating-migrations) | ||
@@ -55,3 +56,3 @@ - [Running Migrations](#running-migrations) | ||
- Easy to distribute, single self-contained binary | ||
- Does not try to upsell you on a SaaS service | ||
- Doesn't try to upsell you on a SaaS service | ||
@@ -91,3 +92,3 @@ ## Installation | ||
```pwsh | ||
scoop install dbmate | ||
$ scoop install dbmate | ||
``` | ||
@@ -111,16 +112,2 @@ | ||
**Heroku** | ||
To use dbmate on Heroku, either use the NPM method, or store the linux binary in your git repository: | ||
```sh | ||
$ mkdir -p bin | ||
$ curl -fsSL -o bin/dbmate https://github.com/amacneil/dbmate/releases/latest/download/dbmate-linux-amd64 | ||
$ chmod +x bin/dbmate | ||
$ git add bin/dbmate | ||
$ git commit -m "Add dbmate binary" | ||
$ git push heroku master | ||
$ heroku run bin/dbmate --help | ||
``` | ||
## Commands | ||
@@ -299,2 +286,3 @@ | ||
#### BigQuery | ||
Follow the following format for `DATABASE_URL` when connecting to actual BigQuery in GCP: | ||
@@ -305,2 +293,3 @@ | ||
``` | ||
`projectid` (mandatory) - Project ID | ||
@@ -312,3 +301,3 @@ | ||
*NOTE: Follow [this doc](https://cloud.google.com/docs/authentication/provide-credentials-adc) on how to set `GOOGLE_APPLICATION_CREDENTIALS` environment variable for proper Authentication* | ||
_NOTE: Follow [this doc](https://cloud.google.com/docs/authentication/provide-credentials-adc) on how to set `GOOGLE_APPLICATION_CREDENTIALS` environment variable for proper Authentication_ | ||
@@ -323,2 +312,28 @@ Follow the following format if trying to connect to a custom endpoint e.g. [BigQuery Emulator](https://github.com/goccy/bigquery-emulator) | ||
#### Spanner | ||
Spanner support is currently limited to databases using the [PostgreSQL Dialect](https://cloud.google.com/spanner/docs/postgresql-interface), which must be chosen during database creation. For future Spanner with GoogleSQL support, see [this discussion](https://github.com/amacneil/dbmate/discussions/369). | ||
Spanner with the Postgres interface requires that the [PGAdapter](https://cloud.google.com/spanner/docs/pgadapter) is running. Use the following format for `DATABASE_URL`, with the host and port set to where the PGAdapter is running: | ||
```shell | ||
DATABASE_URL="spanner-postgres://127.0.0.1:5432/database_name?sslmode=disable" | ||
``` | ||
Note that specifying a username and password is not necessary, as authentication is handled by the PGAdapter (they will be ignored by the PGAdapter if specified). | ||
Other options of the [postgres driver](#postgresql) are supported. | ||
Spanner also doesn't allow DDL to be executed inside explicit transactions. You must therefore specify `transaction:false` on migrations that include DDL: | ||
```sql | ||
-- migrate:up transaction:false | ||
CREATE TABLE ... | ||
-- migrate:down transaction:false | ||
DROP TABLE ... | ||
``` | ||
Schema dumps are not currently supported, as `pg_dump` uses functions that are not provided by Spanner. | ||
### Creating Migrations | ||
@@ -325,0 +340,0 @@ |
37073
623