# ---------------------------------------
# Host : localhost
# Port : 3306
# Database : chho
SET FOREIGN_KEY_CHECKS=0;
DROP DATABASE IF EXISTS `chho`;
CREATE DATABASE `chho`;
USE `chho`;
#
# Structure for the `power_person` table :
#
CREATE TABLE `power_person` (
`POWER_USER_ID` varchar(255) NOT NULL default '',
`POWER_USER_LEVEL` int(11) default NULL,
`POWER_OTHER` varchar(255) default NULL,
PRIMARY KEY (`POWER_USER_ID`),
KEY `FK38F5D2E586CA74B5` (`POWER_USER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
#
# Structure for the `person` table :
#
CREATE TABLE `person` (
`USER_ID` varchar(255) NOT NULL default '',
`NAME` varchar(16) NOT NULL default '',
`PASSWORD` varchar(16) NOT NULL default '',
PRIMARY KEY (`USER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
#
# Structure for the `guest_person` table :
#
CREATE TABLE `guest_person` (
`GUEST_USER_ID` varchar(255) NOT NULL default '',
`GUEST_OTHER` varchar(255) default NULL,
PRIMARY KEY (`GUEST_USER_ID`),
KEY `FKB62739F25ED19688` (`GUEST_USER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
========================================================
alter table GUEST_USER drop constraint FKB62739F25ED19688;
alter table POWER_USER drop constraint FK38F5D2E586CA74B5;
drop table if exists USER;
drop table if exists GUEST_USER;
drop table if exists POWER_USER;
create table USER (USER_ID varchar(255) not null,NAME varchar(16) not null,PASSWORD varchar(16) not null,primary key (USER_ID));
create table GUEST_USER (GUEST_USER_ID varchar(255) not null,GUEST_OTHER varchar(255),primary key (GUEST_USER_ID));
create table POWER_USER (POWER_USER_ID varchar(255) not null,POWER_USER_LEVEL integer,POWER_OTHER varchar(255),primary key (POWER_USER_ID));
alter table GUEST_USER add index FKB62739F25ED19688 (GUEST_USER_ID), add constraint FKB62739F25ED19688 foreign key (GUEST_USER_ID) references USER (USER_ID);
alter table POWER_USER add index FK38F5D2E586CA74B5 (POWER_USER_ID), add constraint FK38F5D2E586CA74B5 foreign key (POWER_USER_ID) references USER (USER_ID);