Create new Validations columns properly:

* Thread-safe preparation of Validations cleanup query
* Followup to RIPD-870
This commit is contained in:
Edward Hennis
2016-03-04 14:15:15 -05:00
parent 64d9f7c23e
commit a327cecee6
3 changed files with 38 additions and 9 deletions

View File

@@ -100,13 +100,6 @@ const char* LedgerDBInit[] =
SignTime BIGINT UNSIGNED, \
RawData BLOB \
);",
// This will error out if the column already exists,
// but DatabaseCon intentionally ignores errors.
"ALTER TABLE Validations \
ADD COLUMN LedgerSeq BIGINT UNSIGNED;",
"ALTER TABLE Validations \
ADD COLUMN InitialSeq BIGINT UNSIGNED;",
"CREATE INDEX IF NOT EXISTS ValidationsByHash ON \
Validations(LedgerHash);",
"CREATE INDEX IF NOT EXISTS ValidationsBySeq ON \