777 Commits

Author SHA1 Message Date
Liam Staskawicz
b41a586b5f dbconf: simple preliminary test 2013-03-30 16:58:28 -07:00
Liam Staskawicz
634c127941 dbconf: accept path and env to allow for testing 2013-03-30 16:58:02 -07:00
Liam Staskawicz
12ca5933e8 Merged in danielrheath/goose/backtraces (pull request #11)
Show backtraces when something goes wrong
2013-03-30 16:06:13 -07:00
Daniel Heath
55a3925a44 Remove recover-repanic code which obliterates backtraces 2013-03-28 12:58:00 +11:00
Liam Staskawicz
3c6b6c35c4 use filepath rather than path to ensure we're dealing with filenames in an OS compatible way. fixes #2. 2013-02-24 23:06:12 -08:00
Liam Staskawicz
003f86c223 Merged in ghthor/goose/postgres-fix (pull request #8: Fix goose_db_version table for postgres.) 2013-01-17 08:17:07 -08:00
Abigail Walthall
527ee49c38 Fix goose_db_version table for postgres.
Tested with:
* mysql  Ver 15.1 Distrib 5.5.28a-MariaDB
* psql (PostgreSQL) 9.2.2
2013-01-17 09:34:37 -05:00
Liam Staskawicz
430f2bf9d0 Breaking change: Merged in ghthor/goose/primary-key-bug (pull request #5: Fixed - timestamp Primary key) 2013-01-16 23:22:16 -08:00
Liam Staskawicz
b959795376 Merged in ghthor/goose/test-fix (pull request #7: Fixed the existing test's that verify the sorting order) 2013-01-16 23:02:27 -08:00
Liam Staskawicz
e2d100db55 Merged in ghthor/goose/mymysql-driver-support (pull request #6: Load the mymysql database driver) 2013-01-16 23:01:49 -08:00
Abigail Walthall
71801fa6bf Fixed the existing test's that verify the sorting order 2013-01-16 20:29:52 -05:00
Liam Staskawicz
bd0a9ad0fd Merged in ghthor/goose/gitignore (pull request #4: Ignore vim swapfiles) 2013-01-16 15:01:01 -08:00
Abigail Walthall
cadc3067a6 Ignore vim swapfiles 2013-01-16 17:58:42 -05:00
Abigail Walthall
c1e1680dc8 Load the mymysql database driver 2013-01-16 17:29:03 -05:00
Abigail Walthall
7b2d93c72a Order the results by the guaranteed unique id instead of the potentially non-unique tstamp 2013-01-16 17:25:03 -05:00
Abigail Walthall
b7fd3077d1 Fix Bug when finalizing the migration table when calling goose up for the first time 2013-01-16 15:38:45 -05:00
Liam Staskawicz
85fac2eb96 Merged in josharian/goose/update-heroku-docs (pull request #3: Update heroku docs) 2013-01-15 09:43:34 -08:00
Josh Bleecher Snyder
039efed9a8 Update and simplify heroku instructions 2013-01-15 09:12:35 -08:00
Liam Staskawicz
d42a8fe983 util: simplify file creation 2013-01-10 23:24:32 -08:00
Liam Staskawicz
b1edd0e4fa Merged in josharian/goose/flexible-dbconf-open (pull request #2: Make dbconf's open more flexible) 2013-01-10 22:06:35 -08:00
Josh Bleecher Snyder
6f67731d6a Autoparse postgres urls 2013-01-10 18:11:46 -08:00
Josh Bleecher Snyder
f787354860 Expand environment variables in dbconf.yml's open
The immediate goal here is to make using goose
with Heroku easier, where the database connection
url is provided by an environment variable. More
generally, this makes it easier to avoid committing
sensitive information like database credentials.
2013-01-10 18:11:45 -08:00
Liam Staskawicz
17747efe29 Merged in josharian/goose (pull request #1: Autocreate db/migrations) 2013-01-09 18:09:48 -08:00
Josh Bleecher Snyder
e364c0995d Autocreate db/migrations 2013-01-09 17:53:48 -08:00
Liam Staskawicz
f89880da03 go migrations: much simpler and more robust way to execute migrations. go migrations are all 'package main', and the version is simply appended to the function name in order to distinguish potentially several migrations in the same 'package main' 2013-01-06 22:47:45 -08:00
Liam Staskawicz
85a0c8b565 remove obsolete version comparison 2013-01-06 22:12:39 -08:00
Liam Staskawicz
edaa9e3049 migrate refactor: simplify MigrationMap struct by allowing each Migration to track its own Version 2013-01-06 22:12:17 -08:00
Liam Staskawicz
0287dcd9b2 readme: slight formatting tweak 2013-01-06 11:32:51 -08:00
Liam Staskawicz
8ccb502c95 readme: add notes about the available commands 2013-01-06 11:31:29 -08:00
Liam Staskawicz
47d455779e create: command to generate the scaffolding for a new migration 2013-01-06 11:22:30 -08:00
Liam Staskawicz
562485a7b7 pending: remove pending command. it wasn't properly implemented and is superseded by the status command anyhow 2013-01-06 10:36:06 -08:00
Liam Staskawicz
5431538c39 refactor: move writeTemplateToFile() into new util.go 2013-01-06 09:22:06 -08:00
Liam Staskawicz
e770a07efe reorg: prefix command sources with 'cmd' for slightly clearer organization 2013-01-06 08:46:21 -08:00
Liam Staskawicz
77a0382914 results: don't bother counting the number of sql statements. we don't have a good way of tracking it for go migrations, and it's not particularly helpful either 2013-01-04 19:39:36 -10:00
Liam Staskawicz
0b250b8511 ensure migration IDs are greater than zero 2013-01-04 19:24:40 -10:00
Liam Staskawicz
517e1701e2 breaking change: version id is now int64 to accommodate larger date-based version id schemes 2013-01-04 19:22:03 -10:00
Liam Staskawicz
9140de5045 status: ensure that the version table exists 2013-01-04 19:16:09 -10:00
Liam Staskawicz
c1320a5e81 rename only: DBVersion => MigrationRecord 2013-01-04 18:32:25 -10:00
Liam Staskawicz
949df006a9 status: add status command to show a summary of applied and pending migrations 2013-01-04 18:29:12 -10:00
Liam Staskawicz
4bec0b22ec breaking change: add a column to the version table to record whether we migrated up or down. fixes the case in which we weren't correctly calculating the current version previously in some cases, and also allows us to maintain a more complete historic record of all migrations made. 2013-01-04 18:11:18 -10:00
Liam Staskawicz
ef4602b5e8 migrate: refactor sorting of migrations out of the collection routine 2012-12-25 12:50:30 -08:00
Liam Staskawicz
8c4171074b readme: missed a couple mentions of configuration vs environment 2012-12-24 12:14:19 -08:00
Liam Staskawicz
5431e23861 pending: slight change to textual output 2012-12-24 12:12:52 -08:00
Liam Staskawicz
9fbce90a79 flags: improved option names 2012-12-24 12:12:31 -08:00
Liam Staskawicz
1232c87d8e note for later 2012-12-24 10:35:35 -08:00
Liam Staskawicz
ab33fd0625 main: adjust usage to indicate that -db and -config apply to the goose command, and that any subcommand options come after the subcommand 2012-12-24 10:28:57 -08:00
Liam Staskawicz
8cd66bc122 pending: add new command that lists migrations yet to be run 2012-12-24 10:27:32 -08:00
Liam Staskawicz
dc913a5569 reorg: move getDBVersion() into migrate to clarify that it's common functionality 2012-12-24 10:22:33 -08:00
Liam Staskawicz
fe14d0a1f5 flags: consolidate dbconf details to DBConf struct, reusable by any subcommands. 2012-12-24 10:09:15 -08:00
Liam Staskawicz
b0dc55130d main: simple usage function. 2012-12-23 18:53:04 -08:00