-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
27 additions
and
2 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,25 @@ | ||
BEGIN TRANSACTION; | ||
|
||
ALTER TABLE tags RENAME TO temp_tags; | ||
|
||
CREATE TABLE | ||
IF NOT EXISTS tags ( | ||
driver_name TEXT NOT NULL, | ||
group_name TEXT NOT NULL, | ||
name TEXT NULL check (length (name) <= 128), | ||
address TEXT NULL check (length (address) <= 128), | ||
attribute INTEGER NOT NULL check (attribute BETWEEN 0 AND 15), | ||
precision INTEGER NOT NULL check (precision BETWEEN 0 AND 17), | ||
decimal REAL NOT NULL, | ||
type INTEGER NOT NULL check (type BETWEEN 0 AND 40), | ||
description TEXT NULL check (length (description) <= 512), | ||
value TEXT, | ||
UNIQUE (driver_name, group_name, name), | ||
FOREIGN KEY (driver_name, group_name) REFERENCES groups (driver_name, name) ON UPDATE CASCADE ON DELETE CASCADE | ||
); | ||
|
||
INSERT INTO tags SELECT * FROM temp_tags; | ||
|
||
DROP TABLE temp_tags; | ||
|
||
COMMIT; |
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
File renamed without changes.
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