mirror of https://github.com/oxen-io/oxen-core.git
Fix broken index
This index was being created on a column that doesn't exist, and apparently because it was quoted (until the commit earlier in this PR), sqlite was apparently treating it as a string literal. Cursed AF. Drop the old name and recreate the index.
This commit is contained in:
parent
a0047a1321
commit
8a2078b51e
|
@ -1583,7 +1583,8 @@ CREATE TABLE IF NOT EXISTS settings (
|
|||
|
||||
CREATE TABLE IF NOT EXISTS mappings ()" + mappings_columns + R"();
|
||||
CREATE INDEX IF NOT EXISTS owner_id_index ON mappings(owner_id);
|
||||
CREATE INDEX IF NOT EXISTS backup_owner_id_index ON mappings(backup_owner_index);
|
||||
DROP INDEX IF EXISTS backup_owner_id_index;
|
||||
CREATE INDEX IF NOT EXISTS backup_owner_index ON mappings(backup_owner_id);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS name_type_update ON mappings (name_hash, type, update_height DESC);
|
||||
CREATE INDEX IF NOT EXISTS mapping_type_name_exp ON mappings (type, name_hash, expiration_height DESC);
|
||||
)";
|
||||
|
@ -1633,7 +1634,7 @@ INSERT INTO mappings
|
|||
DROP TABLE mappings_old;
|
||||
CREATE UNIQUE INDEX name_type_update ON mappings(name_hash, type, update_height DESC);
|
||||
CREATE INDEX owner_id_index ON mappings(owner_id);
|
||||
CREATE INDEX backup_owner_id_index ON mappings(backup_owner_index);
|
||||
CREATE INDEX backup_owner_index ON mappings(backup_owner_id);
|
||||
CREATE INDEX mapping_type_name_exp ON mappings(type, name_hash, expiration_height DESC);
|
||||
COMMIT TRANSACTION;
|
||||
)";
|
||||
|
|
Loading…
Reference in New Issue