-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from TimPushkin/updates
spbu-mm map improvements
- Loading branch information
Showing
4 changed files
with
278 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,272 @@ | ||
{ | ||
"formatVersion": 1, | ||
"database": { | ||
"version": 8, | ||
"identityHash": "4758aac06395f9babe465ff1a1274632", | ||
"entities": [ | ||
{ | ||
"tableName": "map_info", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `floor_width` INTEGER NOT NULL, `floor_height` INTEGER NOT NULL, `tile_size` INTEGER NOT NULL, `levels_num` INTEGER NOT NULL, `floors_num` INTEGER NOT NULL, PRIMARY KEY(`name`))", | ||
"fields": [ | ||
{ | ||
"fieldPath": "name", | ||
"columnName": "name", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "floorWidth", | ||
"columnName": "floor_width", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "floorHeight", | ||
"columnName": "floor_height", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "tileSize", | ||
"columnName": "tile_size", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "levelsNum", | ||
"columnName": "levels_num", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "floorsNum", | ||
"columnName": "floors_num", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": false, | ||
"columnNames": [ | ||
"name" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
}, | ||
{ | ||
"tableName": "marker", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `map_name` TEXT NOT NULL, `type` TEXT NOT NULL, `is_closed` INTEGER NOT NULL, `floor` INTEGER NOT NULL, `x` REAL NOT NULL, `y` REAL NOT NULL, PRIMARY KEY(`id`), FOREIGN KEY(`map_name`) REFERENCES `map_info`(`name`) ON UPDATE NO ACTION ON DELETE RESTRICT )", | ||
"fields": [ | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "mapName", | ||
"columnName": "map_name", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "type", | ||
"columnName": "type", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "isClosed", | ||
"columnName": "is_closed", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "floor", | ||
"columnName": "floor", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "x", | ||
"columnName": "x", | ||
"affinity": "REAL", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "y", | ||
"columnName": "y", | ||
"affinity": "REAL", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": false, | ||
"columnNames": [ | ||
"id" | ||
] | ||
}, | ||
"indices": [ | ||
{ | ||
"name": "index_marker_map_name", | ||
"unique": false, | ||
"columnNames": [ | ||
"map_name" | ||
], | ||
"orders": [], | ||
"createSql": "CREATE INDEX IF NOT EXISTS `index_marker_map_name` ON `${TABLE_NAME}` (`map_name`)" | ||
} | ||
], | ||
"foreignKeys": [ | ||
{ | ||
"table": "map_info", | ||
"onDelete": "RESTRICT", | ||
"onUpdate": "NO ACTION", | ||
"columns": [ | ||
"map_name" | ||
], | ||
"referencedColumns": [ | ||
"name" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"tableName": "marker_text", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`marker_id` INTEGER NOT NULL, `language_id` TEXT NOT NULL, `title` TEXT, `description` TEXT, PRIMARY KEY(`marker_id`, `language_id`), FOREIGN KEY(`marker_id`) REFERENCES `marker`(`id`) ON UPDATE NO ACTION ON DELETE RESTRICT )", | ||
"fields": [ | ||
{ | ||
"fieldPath": "markerId", | ||
"columnName": "marker_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "languageId", | ||
"columnName": "language_id", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "title", | ||
"columnName": "title", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "description", | ||
"columnName": "description", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": false, | ||
"columnNames": [ | ||
"marker_id", | ||
"language_id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [ | ||
{ | ||
"table": "marker", | ||
"onDelete": "RESTRICT", | ||
"onUpdate": "NO ACTION", | ||
"columns": [ | ||
"marker_id" | ||
], | ||
"referencedColumns": [ | ||
"id" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"ftsVersion": "FTS4", | ||
"ftsOptions": { | ||
"tokenizer": "unicode61", | ||
"tokenizerArgs": [], | ||
"contentTable": "marker_text", | ||
"languageIdColumnName": "", | ||
"matchInfo": "FTS4", | ||
"notIndexedColumns": [], | ||
"prefixSizes": [], | ||
"preferredOrder": "ASC" | ||
}, | ||
"contentSyncTriggers": [ | ||
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_marker_text_fts_BEFORE_UPDATE BEFORE UPDATE ON `marker_text` BEGIN DELETE FROM `marker_text_fts` WHERE `docid`=OLD.`rowid`; END", | ||
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_marker_text_fts_BEFORE_DELETE BEFORE DELETE ON `marker_text` BEGIN DELETE FROM `marker_text_fts` WHERE `docid`=OLD.`rowid`; END", | ||
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_marker_text_fts_AFTER_UPDATE AFTER UPDATE ON `marker_text` BEGIN INSERT INTO `marker_text_fts`(`docid`, `title`, `description`) VALUES (NEW.`rowid`, NEW.`title`, NEW.`description`); END", | ||
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_marker_text_fts_AFTER_INSERT AFTER INSERT ON `marker_text` BEGIN INSERT INTO `marker_text_fts`(`docid`, `title`, `description`) VALUES (NEW.`rowid`, NEW.`title`, NEW.`description`); END" | ||
], | ||
"tableName": "marker_text_fts", | ||
"createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`title` TEXT, `description` TEXT, tokenize=unicode61, content=`marker_text`)", | ||
"fields": [ | ||
{ | ||
"fieldPath": "title", | ||
"columnName": "title", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "description", | ||
"columnName": "description", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": false, | ||
"columnNames": [] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
}, | ||
{ | ||
"tableName": "search_history_entry", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`marker_id` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, PRIMARY KEY(`marker_id`), FOREIGN KEY(`marker_id`) REFERENCES `marker`(`id`) ON UPDATE NO ACTION ON DELETE RESTRICT )", | ||
"fields": [ | ||
{ | ||
"fieldPath": "markerId", | ||
"columnName": "marker_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "timestamp", | ||
"columnName": "timestamp", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": false, | ||
"columnNames": [ | ||
"marker_id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [ | ||
{ | ||
"table": "marker", | ||
"onDelete": "RESTRICT", | ||
"onUpdate": "NO ACTION", | ||
"columns": [ | ||
"marker_id" | ||
], | ||
"referencedColumns": [ | ||
"id" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"views": [], | ||
"setupQueries": [ | ||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '4758aac06395f9babe465ff1a1274632')" | ||
] | ||
} | ||
} |
Binary file not shown.
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