mysql schema…. finally

I know this has taken waaay to long to post. But here it is if anyone still wants it.

# CREATE DATABASE voip;
# USE voip;

#
# TABLE STRUCTURE FOR TABLE 'allocation'
#

# DROP TABLE IF EXISTS allocation;
CREATE TABLE `allocation` (
`allocation_id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(11) NOT NULL DEFAULT '0',
`site_id` INT(11) NOT NULL DEFAULT '0',
`extension` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY  (`allocation_id`)
) ENGINE=MyISAM AUTO_INCREMENT=58 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

#
# TABLE STRUCTURE FOR TABLE 'asset'
#

# DROP TABLE IF EXISTS asset;
CREATE TABLE `asset` (
`asset_id` INT(11) NOT NULL AUTO_INCREMENT,
`manufacturer` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`model` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`serial` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`mac` VARCHAR(12) COLLATE latin1_general_ci NOT NULL DEFAULT '000000000000',
`phone_ip` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`purchase_price` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`purchase_date` DATE NOT NULL DEFAULT '0000-00-00',
`purchase_from` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`invoice_number` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
PRIMARY KEY  (`asset_id`)
) ENGINE=MyISAM AUTO_INCREMENT=46 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

#
# TABLE STRUCTURE FOR TABLE 'phoneline'
#

# DROP TABLE IF EXISTS phoneline;
CREATE TABLE `phoneline` (
`line_id` INT(11) NOT NULL AUTO_INCREMENT,
`phone_number` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
PRIMARY KEY  (`line_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

#
# TABLE STRUCTURE FOR TABLE 'server'
#

# DROP TABLE IF EXISTS server;
CREATE TABLE `server` (
`server_id` INT(11) NOT NULL AUTO_INCREMENT,
`site_id` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`server_ip` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`server_hostname` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
PRIMARY KEY  (`server_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

#
# TABLE STRUCTURE FOR TABLE 'site'
#

# DROP TABLE IF EXISTS site;
CREATE TABLE `site` (
`site_id` INT(11) NOT NULL AUTO_INCREMENT,
`site_name` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`street_number` INT(11) NOT NULL DEFAULT '0',
`street_name` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`city` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`state` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
`country` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
PRIMARY KEY  (`site_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

#
# TABLE STRUCTURE FOR TABLE 'user'
#

# DROP TABLE IF EXISTS USER;
CREATE TABLE `user` (
`user_id` INT(11) NOT NULL AUTO_INCREMENT,
`samaccountname` VARCHAR(100) COLLATE latin1_general_ci NOT NULL DEFAULT '',
PRIMARY KEY  (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *