mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 09:07:41 +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{
|
||||
"BLOB": "BYTEA",
|
||||
"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.
|
||||
|
Reference in New Issue
Block a user