mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +01:00
Added comments for columns that may be null.
This commit is contained in:
@@ -46,7 +46,7 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
"CREATE TABLE subscriptions"
|
"CREATE TABLE subscriptions"
|
||||||
+ " (groupId HASH NOT NULL,"
|
+ " (groupId HASH NOT NULL,"
|
||||||
+ " groupName VARCHAR NOT NULL,"
|
+ " groupName VARCHAR NOT NULL,"
|
||||||
+ " groupKey BINARY,"
|
+ " groupKey BINARY," // Null for unrestricted groups
|
||||||
+ " start BIGINT NOT NULL,"
|
+ " start BIGINT NOT NULL,"
|
||||||
+ " PRIMARY KEY (groupId))";
|
+ " PRIMARY KEY (groupId))";
|
||||||
|
|
||||||
@@ -59,17 +59,17 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
private static final String CREATE_MESSAGES =
|
private static final String CREATE_MESSAGES =
|
||||||
"CREATE TABLE messages"
|
"CREATE TABLE messages"
|
||||||
+ " (messageId HASH NOT NULL,"
|
+ " (messageId HASH NOT NULL,"
|
||||||
+ " parentId HASH,"
|
+ " parentId HASH," // Null for the first message in a thread
|
||||||
+ " groupId HASH,"
|
+ " groupId HASH," // Null for private messages
|
||||||
+ " authorId HASH,"
|
+ " authorId HASH," // Null for private or anonymous messages
|
||||||
+ " subject VARCHAR NOT NULL,"
|
+ " subject VARCHAR NOT NULL,"
|
||||||
+ " timestamp BIGINT NOT NULL,"
|
+ " timestamp BIGINT NOT NULL,"
|
||||||
+ " length INT NOT NULL,"
|
+ " length INT NOT NULL,"
|
||||||
+ " bodyStart INT NOT NULL,"
|
+ " bodyStart INT NOT NULL,"
|
||||||
+ " bodyLength INT NOT NULL,"
|
+ " bodyLength INT NOT NULL,"
|
||||||
+ " raw BLOB NOT NULL,"
|
+ " raw BLOB NOT NULL,"
|
||||||
+ " sendability INT,"
|
+ " sendability INT," // Null for private messages
|
||||||
+ " contactId INT,"
|
+ " contactId INT," // Null for group messages
|
||||||
+ " PRIMARY KEY (messageId),"
|
+ " PRIMARY KEY (messageId),"
|
||||||
+ " FOREIGN KEY (groupId) REFERENCES subscriptions (groupId)"
|
+ " FOREIGN KEY (groupId) REFERENCES subscriptions (groupId)"
|
||||||
+ " ON DELETE CASCADE,"
|
+ " ON DELETE CASCADE,"
|
||||||
@@ -114,7 +114,7 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
+ " (contactId INT NOT NULL,"
|
+ " (contactId INT NOT NULL,"
|
||||||
+ " groupId HASH NOT NULL,"
|
+ " groupId HASH NOT NULL,"
|
||||||
+ " groupName VARCHAR NOT NULL,"
|
+ " groupName VARCHAR NOT NULL,"
|
||||||
+ " groupKey BINARY,"
|
+ " groupKey BINARY," // Null for unrestricted groups
|
||||||
+ " start BIGINT NOT NULL,"
|
+ " start BIGINT NOT NULL,"
|
||||||
+ " PRIMARY KEY (contactId, groupId),"
|
+ " PRIMARY KEY (contactId, groupId),"
|
||||||
+ " FOREIGN KEY (contactId) REFERENCES contacts (contactId)"
|
+ " FOREIGN KEY (contactId) REFERENCES contacts (contactId)"
|
||||||
|
|||||||
Reference in New Issue
Block a user