pull/26/head
Aidaho12 2018-07-26 10:49:58 +06:00
parent f251338d06
commit 008fdde04c
2 changed files with 2 additions and 1 deletions

View File

@ -123,6 +123,7 @@ def create_table(**kwargs):
`uuid` varchar ( 64 )
);
CREATE TABLE IF NOT EXISTS `cred` (
`id` integer primary key autoincrement,
`enable` INTEGER NOT NULL DEFAULT 1,
`username` VARCHAR ( 64 ) NOT NULL,
`password` VARCHAR ( 64 ) NOT NULL

View File

@ -11,6 +11,6 @@ CREATE TABLE IF NOT EXISTS `groups` (`id` INTEGER NOT NULL AUTO_INCREMENT,`name`
INSERT INTO `groups` (name, description) VALUES ('All','All servers enter in this group');
CREATE TABLE IF NOT EXISTS `servers` (`id` INTEGER NOT NULL AUTO_INCREMENT,`hostname` VARCHAR ( 64 ) UNIQUE,`ip` VARCHAR ( 64 ) UNIQUE,`groups` VARCHAR ( 64 ), PRIMARY KEY(`id`));
CREATE TABLE IF NOT EXISTS `uuid` (`user_id` INTEGER NOT NULL, `uuid` varchar ( 64 ) );
CREATE TABLE IF NOT EXISTS `cred` (`enable` INTEGER NOT NULL DEFAULT 1, `username` VARCHAR ( 64 ) NOT NULL, `password` VARCHAR ( 64 ) NOT NULL );
CREATE TABLE IF NOT EXISTS `cred` (`id` integer primary key AUTO_INCREMENT,`enable` INTEGER NOT NULL DEFAULT 1, `username` VARCHAR ( 64 ) NOT NULL, `password` VARCHAR ( 64 ) NOT NULL );
insert into cred('enable','username','password') values ('1', 'root','password');
CREATE TABLE IF NOT EXISTS `token` (`user_id` INTEGER, `token` varchar(64), `exp` timestamp default '0000-00-00 00:00:00');