Commit Graph

21 Commits

Author SHA1 Message Date
Fuad Hasan
101d498909 Add comment handling and related tests for migration functionality (#344) 2025-09-13 10:04:04 -04:00
Dmitry Kropachev
643d2e775e Update golang to 1.20 (#316)
* Update golang to 1.20

* Fix workflow file to make it work on `1.20`

* Update fieldalignment to 0.24.0

* Remove depricated ioutils

ioutils was depricatd and removed, same API available at `os` and `io`
packages now.
2025-04-25 13:34:40 -04:00
Samuel
7d9ff7c98c feat(migrate): add pending migrations function (#286) 2024-09-13 10:32:35 -04:00
Jack Philippi
3007fd5ab5 Fixed typo in error 2024-08-26 08:59:43 +02:00
Jack Philippi
589b2aa06a Updated error message for inconsistent migrations 2024-08-26 08:59:43 +02:00
sylwiaszunejko
e7267922c4 Release v3 - change v2 suffix to v3
Because of recent changes there is a need for a new major
release. Changes are switching to scylladb/gocql and replacing
Unsafe with Strict mechanism.
2024-07-15 10:41:57 +02:00
Dmitry Kropachev
ab80d70106 Update golangci-lint and turn it on in CI 2024-06-19 08:08:54 +02:00
Michał Matczuk
fe1498fe13 migrate: add support for new Go io/fs.FS
This patch adds FromFS function and lets you use the new go:embed directive to add the migration files to the binary.
Also, migration tests use an in memory FS impl instead of working with tmp directories.
2021-04-30 11:19:14 +02:00
Michał Matczuk
fbe7bc45b5 migrate: Remove "failed" wording from error messages 2020-12-03 13:37:56 +01:00
Michał Matczuk
d25129e2fc migrate: Add support CQL comment callbacks
This patch adds a new migration event type CallComment that it triggered by adding `-- CALL <name>;` comment in a CQL file.

Fixes #101
2020-12-03 13:37:56 +01:00
Michał Matczuk
cea42f14c7 Update tests to use v2
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-29 10:54:39 +02:00
Michał Matczuk
95d96fa939 Merge pull request #3 from hailocab/upstream-merge
Upstream merge
Add Session wrapper

With this patch we can now use gocqlx like:

```
session.Query(`SELECT * FROM struct_table`, nil).Get(&v)
```

instead of (old format):

```
gocqlx.Query(session.Query(`SELECT * FROM struct_table`), nil).Get(&v)
```

Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-21 10:07:45 +02:00
Michał Matczuk
710f921b79 Remove deprecated top level functions Get and Select
Signed-off-by: Michał Matczuk <michal@scylladb.com>
2020-04-16 12:39:34 +02:00
Daniel Lohse
ed4fad9742 Add DefaultAwaitSchemaAgreement option (disabled by default)
Depending on what is set, schema agreement is checked before each file or before each statement.
Awaiting schema agreement after every migration has run is always done.
2020-02-05 15:23:06 +01:00
Michał Matczuk
b4347d2757 migrate: migration integration tests 2018-05-24 14:36:14 +02:00
Michał Matczuk
e74702cb6a migrate: migration callbacks
Callback enables interrupting the migration process and executing code
while migrating.
2018-05-23 16:02:40 +02:00
Michał Matczuk
ca0bd49565 migrate: replace tinyint with int
Tinyint is not supported on scylla enterprise.
2017-12-20 16:03:08 +01:00
Vasileios Karagkounis
cab01c8d25 Provide feedback if no files or statements found (#32)
Provide feedback if no migration files were found
2017-12-19 09:57:50 +01:00
Daniel Cunha (soro)
d14aa34200 Moved var to const 2017-10-25 09:28:13 -02:00
Michał Matczuk
9604635e8e migrate: renamed table 2017-09-25 10:01:48 +02:00
Michał Matczuk
3351b1f9a3 migrate 2017-09-22 14:05:26 +02:00