1. Alexander Lee
  2. Flunt Sql Data Access Layer

Wiki

Clone wiki

Flunt Sql Data Access Layer / show_create_sql_script

Home<<

Create Sql Scripts

CREATE  TABLE IF NOT EXISTS `test_db`.`auth_user` (
  `id` INT NOT NULL AUTO_INCREMENT ,
  `username` VARCHAR(30) NULL ,
  `password` VARCHAR(45) NULL ,
  `email` VARCHAR(45) NULL ,
  `nick_name` VARCHAR(28) NULL DEFAULT NULL ,
  `join_date` DATETIME NULL ,
  `last_login` DATETIME NULL ,
  `is_active` TINYINT NULL ,
  `state` TINYINT NULL ,
  PRIMARY KEY (`id`) ,
  UNIQUE INDEX `username_UNIQUE` (`username` ASC) ,
  UNIQUE INDEX `email_UNIQUE` (`email` ASC) ,
  UNIQUE INDEX `nick_name_UNIQUE` (`nick_name` ASC) ,
  INDEX `password_I` (`password` ASC) ,
  INDEX `join_date_I` USING BTREE (`join_date` DESC) ,
  INDEX `last_login_I` (`last_login` DESC) ,
  INDEX `is_active_I` (`is_active` ASC) ,
  INDEX `state_I` USING BTREE (`state` ASC) )
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci


CREATE  TABLE IF NOT EXISTS `test_db`.`user_profile` (
  `id` INT NOT NULL AUTO_INCREMENT ,
  `user_id` INT NULL ,
  `first_name` VARCHAR(45) NULL ,
  `last_name` VARCHAR(45) NULL ,
  `icon` VARCHAR(45) NULL ,
  `short_url` VARCHAR(45) NULL ,
  `sex` TINYINT NULL ,
  `birth_year` TINYINT NULL ,
  `birth_month` TINYINT NULL ,
  `birth_day` TINYINT NULL ,
  `location` TINYINT NULL ,
  `location_name` VARCHAR(45) NULL ,
  `last_modify` DATETIME NULL ,
  PRIMARY KEY (`id`) ,
  INDEX `first_name_I` (`first_name` ASC) ,
  INDEX `last_name_I` (`last_name` ASC) ,
  INDEX `sex_I` (`sex` ASC) ,
  INDEX `birth_year_I` USING BTREE (`birth_year` ASC) ,
  INDEX `birth_month_I` (`birth_month` ASC) ,
  INDEX `birth_day_I` USING BTREE (`birth_day` ASC) ,
  INDEX `location_I` (`location` ASC) ,
  INDEX `last_modify_I` USING BTREE (`last_modify` ASC) ,
  INDEX `profile_user_id_I` USING BTREE (`user_id` ASC) )
ENGINE = InnoDB

CREATE  TABLE IF NOT EXISTS `test_db`.`user_state` (
  `id` INT NOT NULL ,
  `user_id` INT NULL ,
  `posts` INT NULL ,
  `replys` INT NULL ,
  `ats` INT NULL ,
  `followers` INT NULL ,
  `followings` INT NULL ,
  `msgs` INT NULL ,
  PRIMARY KEY (`id`) ,
  INDEX `count_user_id_I` USING BTREE (`user_id` ASC) )
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci

Updated