Ori Shalom
7dcddde25a
feat: expose new functions for setting context ( #517 )
2023-06-16 09:34:33 -04:00
Michael Fridman
87592390b9
fix: use global table name in queries ( #515 )
2023-05-08 08:17:14 -04:00
Michael Fridman
c462979327
refactor: create a generic store and stub out dialect queries ( #477 )
2023-03-14 08:34:47 -04:00
Michael Fridman
33106fc6f2
chore: update annotation comments ( #478 )
2023-03-13 09:19:48 -04:00
Michael Fridman
32ad603fee
Add golangci-lint and fix errors ( #456 )
2023-01-27 08:30:31 -05:00
Michael Fridman
5a6c34ee2d
Add NO_COLOR (-no-color) support ( #409 )
2022-10-20 16:23:29 -04:00
Michael Fridman
f3d569f61b
Remove pkg/errors in favor of std lib ( #373 )
2022-06-22 21:36:07 -04:00
Nikita Sidorov
e7c5f69f48
Periodic output for long running migrations ( #364 )
...
* Periodic output for long running migrations
* Periodic output for long running migrations with seconds
2022-06-15 17:31:26 +02:00
Michael Fridman
c8aa123e31
Adds support to apply migrations without versioning ( #291 )
2021-12-13 00:37:44 -05:00
Michael Fridman
38c3d58685
Remove version row on down migrations outside txn ( #296 )
2021-12-11 17:14:17 -05:00
Pichugin Dmitry
cfa2c3979d
fixing panic when a transaction can't be open
...
Signed-off-by: Pichugin Dmitry <pichugin.dmitry.v@gmail.com>
2019-05-26 09:53:19 +03:00
Vojtech Vitek
213f48bec6
Add test case for MySQL change delimiter #127
2019-03-05 14:58:33 -05:00
Vojtech Vitek
94c2f51496
Refactor; make the new SQL parser build
2019-03-05 01:12:32 -05:00
Vojtech Vitek
456f34d42d
Kick off new SQL parser
2019-03-05 01:11:22 -05:00
Vojtech Vitek
3de24458e7
Print the SQL statement on error
2019-03-04 21:13:40 -05:00
Vojtech Vitek
1a52cca438
Remove log.Fatal() calls from the goose pkg
...
Fixes #76
2019-03-04 20:41:47 -05:00
Vojtech Vitek
d431110f17
Merge pull request #135 from tbaud0n/master
...
Add verbose option to print executed sql statements
2019-03-04 15:02:13 -05:00
Vojtech Vitek
9292c394c8
Merge pull request #93 from hexdigest/master
...
fix goose memory consumption on large migrations
2019-03-04 14:21:11 -05:00
Tony
0e09297902
Remove verbose custom type
2018-12-21 14:24:46 +01:00
Tony
f640a5cb1b
Clarify the verbose expected value
2018-12-18 16:13:56 +01:00
Tony
b935f725d3
Use VerboseMode as boolean + Display block comments
2018-12-18 16:08:33 +01:00
Tony
7b7eaf1c29
Add verbose option to print executed sql statements
2018-12-17 09:08:30 +01:00
1vn
1dd31552aa
delete row on db-down
2018-11-23 16:54:36 -05:00
TomasBarry
39c030eac9
Exit the program when migration can't be parsed
2018-09-24 20:50:27 +01:00
Maxim Krasilnikov
1cebce80c7
Added logger interface and SetLogger func for redefine package output
2018-04-30 12:30:13 +03:00
Max Chechel
90415d49c5
return buffer back to the pool
2018-01-23 11:36:54 +03:00
Max Chechel
111f7d20fe
fix goose memory consumption on large migrations
2018-01-22 19:51:45 +03:00
Vojtech Vitek
488325a6ec
Remove debug log
2017-06-20 16:41:56 -04:00
Vojtech Vitek
a26643fb2b
Fix migrations w/o TX, refactor
2017-06-20 16:30:29 -04:00
Nicholas Duffy
a515c0b5b9
Update `NO TRANSACTIONS` to `NO TRANSACTION`
2017-05-06 13:39:52 -06:00
Nicholas Duffy
fa8806ecfd
Add support for optional migrations.
...
See the discussion in https://github.com/pressly/goose/issues/7 .
Credit goes to @dkotson for his gist here: https://github.com/pressly/goose/issues/7#issuecomment-241613482
I've just added that patch to this repository and change the transaction comment to `-- +goose NO TRANSACTIONS`.
- Checks the migration file for `-- +goose NO TRANSACTIONS`
- Based upon that line, either runs the up/down SQL with or without transactions
- Add test to check for transactions
- Update README
Closes #7 .
2017-05-06 09:41:44 -06:00
Vojtech Vitek (V-Teq)
c78d864291
Register Go functions as complex Go migrations
2016-03-03 18:48:45 -05:00
Vojtech Vitek (V-Teq)
2cccd9df36
Refactor goose pkg
2016-03-02 17:23:15 -05:00
Vojtech Vitek (V-Teq)
47e4c98a97
Move lib/goose into top level pkg
2016-02-26 14:50:27 -05:00
Liam Staskawicz
381d1ac678
wip (not building): begin restructuring into separate cmd and lib packages, to allow external applications to make use of goose's internal functionality. part of #6 .
2013-09-30 13:38:02 -07:00
Liam Staskawicz
cb801ded9c
sql migrations: add new annotation to accommodate SQL statements that may have semicolons within them, such as functions. some basic tests as well. fixes #4
2013-09-27 14:24:37 -07:00
Liam Staskawicz
bab8917da5
dialect: use insertVersionSql() to ensure txn.Exec() args are handled properly in each dialect
2013-07-08 23:37:30 -07:00
Liam Staskawicz
f8e86e3745
migration: allow database/sql to do type conversion to avoid dialect differences
2013-06-30 11:38:24 -07:00
Liam Staskawicz
c9a4615595
migration sql: error out if no annotations are found, rather than marking the migration as having run successfully.
2013-04-07 16:55:13 -07:00
Liam Staskawicz
bb38ea2554
sql migration: diagnose scripts that have no Up/Down annotations. fixes #3
2013-04-07 12:17:07 -07: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
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
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
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
c28116e175
reorg: move source files to top level of repo to simplify `go install` usage.
2012-12-17 08:12:20 -08:00