forked from golang-migrate/migrate
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* clickhouse: Quote db name in ensureVersionTable * Quote in drop as well * Leverage quoteIdentifier from pgx * Add to clickhouse README.md database creation * Remove cluster adaptation for tables to pass tests * Update README.md * Correct a spelling mistake * Move supported go version to standard place * add tests for scylladb. add scylladb to docs * small changes to retry failed by timeout CI * Update aws-sdk-go to adress vulerabilitiy * Update lib/pq to fix cert permissions issues When attempting to connect to a PostgreSQL database using certificate credentials, authentication may fail due to permissions issues on the certificate files. When using migrate in Kubernetes, this issue may be unavoidable when using secrets. The github.com/lib/pq library has resolved this issue as of v1.10.6, so this commit updates that library to the latest release version (v1.10.9) to resolve the issue in migrate. * Added support for pgx locking table In order to support running migrations through PgBouncer which does not support advisory locks. * Added documentation and test for lock strategy * Add syntax highlighting to Postgres example * Updated version of spanner to support sequences and generate uuid * fix: typo Signed-off-by: guoguangwu <[email protected]> * feature: add rqlite support * Add rqlite 8.0.0 to tested database versions * patch vulns * update rqlite 8 container version to 8.0.6 * New release prep * Update dktest from v0.3.16 to v0.4.0 to fix docker vulnerability * Fix linter issues * Update outdated GitHub Actions * Update from alpine 3.18 to 3.19 * Bump golang.org/x/crypto from 0.14.0 to 0.17.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](golang/crypto@v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * add 8.11 and 8.12 versions and remove debug logging * Bump google.golang.org/grpc from 1.55.0 to 1.56.3 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.55.0 to 1.56.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.55.0...v1.56.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Clean up require directive grouping * Reformat ScyllaDB/Cassandra docs * Quote locktable from config in queries Defer rollback of transactions * Update aws-sdk-go from v1.44.301 to v1.49.6 * Drop support for Go 1.19 and add support for Go 1.21 * Only test against YugabyteDB LTS releases * Fix GoReleaser deprecations https://goreleaser.com/deprecations/#-rm-dist https://goreleaser.com/deprecations/#sourcerlcp --------- Signed-off-by: guoguangwu <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Luca Nardelli <[email protected]> Co-authored-by: Viktoria <[email protected]> Co-authored-by: Viktoria <[email protected]> Co-authored-by: Sandro <[email protected]> Co-authored-by: Maxim Korolyov <[email protected]> Co-authored-by: Jan Śreniawski <[email protected]> Co-authored-by: Rob Prentiss <[email protected]> Co-authored-by: Andreas Emilsson <[email protected]> Co-authored-by: Tommy Karlsson <[email protected]> Co-authored-by: Toby Scott <[email protected]> Co-authored-by: Jacopo Sabbatini <[email protected]> Co-authored-by: guoguangwu <[email protected]> Co-authored-by: Erik Swenson <[email protected]> Co-authored-by: Dale Hui <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d6166ab
commit 9e6d75a
Showing
32 changed files
with
1,224 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,6 @@ release: | |
prerelease: auto | ||
source: | ||
enabled: true | ||
rlcp: true | ||
format: zip | ||
changelog: | ||
skip: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM alpine:3.18 | ||
FROM alpine:3.19 | ||
|
||
RUN apk add --no-cache ca-certificates | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
database/clickhouse/examples/migrations/003_create_database.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
DROP TABLE IF EXISTS driver_ratings; | ||
DROP TABLE IF EXISTS user_ratings; | ||
DROP TABLE IF EXISTS orders; | ||
DROP TABLE IF EXISTS driver_ratings_queue; | ||
DROP TABLE IF EXISTS user_ratings_queue; | ||
DROP TABLE IF EXISTS orders_queue; | ||
DROP VIEW IF EXISTS user_ratings_queue_mv; | ||
DROP VIEW IF EXISTS driver_ratings_queue_mv; | ||
DROP VIEW IF EXISTS orders_queue_mv; | ||
DROP DATABASE IF EXISTS analytics; |
81 changes: 81 additions & 0 deletions
81
database/clickhouse/examples/migrations/003_create_database.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
CREATE DATABASE IF NOT EXISTS analytics; | ||
|
||
CREATE TABLE IF NOT EXISTS analytics.driver_ratings( | ||
rate UInt8, | ||
userID Int64, | ||
driverID String, | ||
orderID String, | ||
inserted_time DateTime DEFAULT now() | ||
) ENGINE = MergeTree | ||
PARTITION BY driverID | ||
ORDER BY (inserted_time); | ||
|
||
CREATE TABLE analytics.driver_ratings_queue( | ||
rate UInt8, | ||
userID Int64, | ||
driverID String, | ||
orderID String | ||
) ENGINE = Kafka | ||
SETTINGS kafka_broker_list = 'broker:9092', | ||
kafka_topic_list = 'driver-ratings', | ||
kafka_group_name = 'rating_readers', | ||
kafka_format = 'Avro', | ||
kafka_max_block_size = 1048576; | ||
|
||
CREATE MATERIALIZED VIEW analytics.driver_ratings_queue_mv TO analytics.driver_ratings AS | ||
SELECT rate, userID, driverID, orderID | ||
FROM analytics.driver_ratings_queue; | ||
|
||
CREATE TABLE IF NOT EXISTS analytics.user_ratings( | ||
rate UInt8, | ||
userID Int64, | ||
driverID String, | ||
orderID String, | ||
inserted_time DateTime DEFAULT now() | ||
) ENGINE = MergeTree | ||
PARTITION BY userID | ||
ORDER BY (inserted_time); | ||
|
||
CREATE TABLE analytics.user_ratings_queue( | ||
rate UInt8, | ||
userID Int64, | ||
driverID String, | ||
orderID String | ||
) ENGINE = Kafka | ||
SETTINGS kafka_broker_list = 'broker:9092', | ||
kafka_topic_list = 'user-ratings', | ||
kafka_group_name = 'rating_readers', | ||
kafka_format = 'JSON', | ||
kafka_max_block_size = 1048576; | ||
|
||
CREATE MATERIALIZED VIEW analytics.user_ratings_queue_mv TO analytics.user_ratings AS | ||
SELECT rate, userID, driverID, orderID | ||
FROM analytics.user_ratings_queue; | ||
|
||
CREATE TABLE IF NOT EXISTS analytics.orders( | ||
from_place String, | ||
to_place String, | ||
userID Int64, | ||
driverID String, | ||
orderID String, | ||
inserted_time DateTime DEFAULT now() | ||
) ENGINE = MergeTree | ||
PARTITION BY driverID | ||
ORDER BY (inserted_time); | ||
|
||
CREATE TABLE analytics.orders_queue( | ||
from_place String, | ||
to_place String, | ||
userID Int64, | ||
driverID String, | ||
orderID String | ||
) ENGINE = Kafka | ||
SETTINGS kafka_broker_list = 'broker:9092', | ||
kafka_topic_list = 'orders', | ||
kafka_group_name = 'order_readers', | ||
kafka_format = 'Avro', | ||
kafka_max_block_size = 1048576; | ||
|
||
CREATE MATERIALIZED VIEW analytics.orders_queue_mv TO orders AS | ||
SELECT from_place, to_place, userID, driverID, orderID | ||
FROM analytics.orders_queue; |
Oops, something went wrong.