aboutsummaryrefslogblamecommitdiff
path: root/dbinit.sql
blob: bbff3c71e57ffd790d47265f5600f0698d7f0fdb (plain) (tree)
1
2
3
4
5
6
7
8
9

                        





                                       
                                                                          



                                                                    




                                                       
                             


                                 
CREATE DATABASE arfnet2;

CREATE TABLE `arfnet2`.`users` (
    `id` INT NOT NULL AUTO_INCREMENT ,
    `username` VARCHAR(31) NOT NULL ,
    `password` VARCHAR(255) NOT NULL ,
    `email` VARCHAR(127) NOT NULL ,
    `verifycode` VARCHAR(31) NOT NULL ,
    `status` ENUM('verified','unverified') NOT NULL DEFAULT 'unverified' ,
    `type` ENUM('client','helpdesk','accountant','admin') NOT NULL ,
    `regdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
    PRIMARY KEY (`id`)
);

CREATE TABLE `arfnet2`.`services` (
    `id` INT NOT NULL AUTO_INCREMENT ,
    `name` VARCHAR(255) NOT NULL ,
    `type` ENUM('free','standard','premium') NOT NULL ,
    `billing` TEXT NOT NULL ,
    `description` TEXT NOT NULL ,
    PRIMARY KEY (`id`)
);