Add UNIQUE constraint for alias
on servers
table
This commit is contained in:
parent
032f6fbc3b
commit
bd4fdfdc7b
1 changed files with 2 additions and 1 deletions
|
@ -346,7 +346,8 @@ class Database(object):
|
|||
self.execute("""CREATE TABLE servers
|
||||
(server_id INTEGER PRIMARY KEY, alias TEXT, hostname TEXT,
|
||||
port INTEGER, password TEXT, ipv4 BOOLEAN, tls BOOLEAN,
|
||||
bindhost TEXT, nickname TEXT, username TEXT, realname TEXT)""")
|
||||
bindhost TEXT, nickname TEXT, username TEXT, realname TEXT,
|
||||
UNIQUE (alias))""")
|
||||
def make_channels_table(self):
|
||||
if not self.has_table("channels"):
|
||||
self.execute("""CREATE TABLE channels
|
||||
|
|
Loading…
Reference in a new issue