SQL migrations for Postgres
Project description
![](http://wildgoosefestival.org/wp-content/uploads/2014/06/wild-goose-in-action.jpg)
SQL migrations for Postgres
Usage:
```
docker build -t iqueue/goose .
docker run \
-it --rm \
--name=goose-migrate \
-e 'PGPASSWORD=top-secret' \
-e 'DB_HOST=docker.for.mac.localhost' \
-v "${PWD}/migrations:/opt/leantaas/migrations" \
iqueue/goose
```
Where `${PWD}/migrations` is some directory of form:
```
./migrations
1_up.sql
1_down.sql
2_up.sql
2_down.sql
3_up.sql
3_down.sql
```
Current main difference from Play Framework migrations is that a migration in Goose is all-or-nothing.
E.g. you are on master branch on revision 5 and want to switch to a feature branch whose latest revision is 4'.
```
1 <- 2 <- 3 <- 4 <- 5
\
3' <- 4'
```
Applying migrations through Goose will leave you on either revision 5 (if an error is encountered) or revision 4' (if migration is successful) but not on any of 4, 3, 2, or 3'.
--------------------------------------------------------------------
Copyright 2018 LeanTaas, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
postgoose-0.0.3.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for postgoose-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 199a873f0907a511e3287885b098d04b2a088d36fcf940ba113b8376bff8b8d3 |
|
MD5 | cb47a4af73a3b3053b0f72e7566a8f64 |
|
BLAKE2b-256 | 7f1c7ea4b76e106820644d6423f2533831f247f611359325ec4590b2c3e1fae5 |