Commit 51c4f647 authored by Julien Muchembled's avatar Julien Muchembled

storage: data.value column never contains NULL

parent f0713aa3
...@@ -197,7 +197,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -197,7 +197,7 @@ class MySQLDatabaseManager(DatabaseManager):
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
hash BINARY(20) NOT NULL, hash BINARY(20) NOT NULL,
compression TINYINT UNSIGNED NULL, compression TINYINT UNSIGNED NULL,
value LONGBLOB NULL, value LONGBLOB NOT NULL,
UNIQUE (hash, compression) UNIQUE (hash, compression)
) ENGINE=""" + engine) ) ENGINE=""" + engine)
......
...@@ -161,7 +161,7 @@ class SQLiteDatabaseManager(DatabaseManager): ...@@ -161,7 +161,7 @@ class SQLiteDatabaseManager(DatabaseManager):
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
hash BLOB NOT NULL, hash BLOB NOT NULL,
compression INTEGER NOT NULL, compression INTEGER NOT NULL,
value BLOB NULL) value BLOB NOT NULL)
""") """)
q("""CREATE UNIQUE INDEX IF NOT EXISTS _data_i1 ON q("""CREATE UNIQUE INDEX IF NOT EXISTS _data_i1 ON
data(hash, compression) data(hash, compression)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment