Refactor
This commit is contained in:
parent
b2ca7d2cd1
commit
c3dc1221f7
1 changed files with 7 additions and 11 deletions
|
@ -99,40 +99,36 @@ switch ($step) {
|
|||
* Users
|
||||
*/
|
||||
$database->query('CREATE TABLE `users` (
|
||||
`id` int AUTO_INCREMENT,
|
||||
`id` int PRIMARY KEY AUTO_INCREMENT,
|
||||
`email` varchar(64) NOT NULL UNIQUE,
|
||||
`password` varchar(128) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
`password` varchar(128) NOT NULL
|
||||
);');
|
||||
|
||||
/**
|
||||
* Wishlists
|
||||
*/
|
||||
$database->query('CREATE TABLE `wishlists` (
|
||||
`id` int AUTO_INCREMENT,
|
||||
`id` int PRIMARY KEY AUTO_INCREMENT,
|
||||
`user` int NOT NULL,
|
||||
`name` varchar(128) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
`name` varchar(128) NOT NULL
|
||||
);');
|
||||
|
||||
/**
|
||||
* Products
|
||||
*/
|
||||
$database->query('CREATE TABLE `products` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`id` int NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
`wishlist` int NOT NULL,
|
||||
`url` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);');
|
||||
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
$database->query('CREATE TABLE `options` (
|
||||
`id` int AUTO_INCREMENT,
|
||||
`id` int PRIMARY KEY AUTO_INCREMENT,
|
||||
`key` varchar(64) NOT NULL UNIQUE,
|
||||
`value` varchar(128) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
`value` varchar(128) NOT NULL
|
||||
);');
|
||||
|
||||
$database->query('INSERT INTO `options`
|
||||
|
|
Loading…
Reference in a new issue