mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 21:36:17 +02:00
sqldb: Make sure we do not replace keywords if they have a prefix
We don't for example want to replace CURRENT_TIMESTAMP when using it in our tables.
This commit is contained in:
@@ -30,7 +30,10 @@ var (
|
|||||||
postgresSchemaReplacements = map[string]string{
|
postgresSchemaReplacements = map[string]string{
|
||||||
"BLOB": "BYTEA",
|
"BLOB": "BYTEA",
|
||||||
"INTEGER PRIMARY KEY": "BIGSERIAL PRIMARY KEY",
|
"INTEGER PRIMARY KEY": "BIGSERIAL PRIMARY KEY",
|
||||||
"TIMESTAMP": "TIMESTAMP WITHOUT TIME ZONE",
|
// We need this space in front of the TIMESTAMP keyword to
|
||||||
|
// avoid replacing words which just have the word "TIMESTAMP" in
|
||||||
|
// them.
|
||||||
|
" TIMESTAMP": " TIMESTAMP WITHOUT TIME ZONE",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure PostgresStore implements the MigrationExecutor interface.
|
// Make sure PostgresStore implements the MigrationExecutor interface.
|
||||||
|
Reference in New Issue
Block a user