MySQL Create Table SQL
Table Structure: okayapi_box_client:/tablelist/okayapi_box_client.html
-- MySQL Table okayapi_box_client
-- From: OkayAPI.com
CREATE TABLE `okayapi_box_client` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`aid` varchar(255) NULL COMMENT 'Alternative id for foreign systems',
`client_group_id` bigint(20) NULL COMMENT '',
`role` varchar(30) NULL DEFAULT 'client' COMMENT 'client',
`auth_type` varchar(255) NULL COMMENT '',
`email` varchar(255) NULL COMMENT '',
`pass` varchar(255) NULL COMMENT '',
`salt` varchar(255) NULL COMMENT '',
`status` varchar(30) NULL DEFAULT 'active' COMMENT 'active, suspended, canceled',
`email_approved` tinyint(1) NULL COMMENT '',
`tax_exempt` tinyint(1) NULL DEFAULT '0' COMMENT '',
`type` varchar(100) NULL COMMENT '',
`first_name` varchar(100) NULL COMMENT '',
`last_name` varchar(100) NULL COMMENT '',
`gender` varchar(20) NULL COMMENT '',
`birthday` date NULL COMMENT '',
`phone_cc` varchar(10) NULL COMMENT '',
`phone` varchar(100) NULL COMMENT '',
`company` varchar(100) NULL COMMENT '',
`company_vat` varchar(100) NULL COMMENT '',
`company_number` varchar(255) NULL COMMENT '',
`address_1` varchar(100) NULL COMMENT '',
`address_2` varchar(100) NULL COMMENT '',
`city` varchar(100) NULL COMMENT '',
`state` varchar(100) NULL COMMENT '',
`postcode` varchar(100) NULL COMMENT '',
`country` varchar(100) NULL COMMENT '',
`document_type` varchar(100) NULL COMMENT '',
`document_nr` varchar(20) NULL COMMENT '',
`notes` text NULL COMMENT '',
`currency` varchar(10) NULL COMMENT '',
`lang` varchar(10) NULL COMMENT '',
`ip` varchar(45) NULL COMMENT '',
`api_token` varchar(128) NULL COMMENT '',
`referred_by` varchar(255) NULL COMMENT '',
KEY `aid` (`aid`),
KEY `client_group_id` (`client_group_id`),
KEY `role` (`role`),
KEY `auth_type` (`auth_type`),
KEY `email` (`email`),
KEY `pass` (`pass`),
KEY `salt` (`salt`),
KEY `status` (`status`),
KEY `email_approved` (`email_approved`),
KEY `tax_exempt` (`tax_exempt`),
KEY `type` (`type`),
KEY `first_name` (`first_name`),
KEY `last_name` (`last_name`),
KEY `gender` (`gender`),
KEY `birthday` (`birthday`),
KEY `phone_cc` (`phone_cc`),
KEY `phone` (`phone`),
KEY `company` (`company`),
KEY `company_vat` (`company_vat`),
KEY `company_number` (`company_number`),
KEY `address_1` (`address_1`),
KEY `address_2` (`address_2`),
KEY `city` (`city`),
KEY `state` (`state`),
KEY `postcode` (`postcode`),
KEY `country` (`country`),
KEY `document_type` (`document_type`),
KEY `document_nr` (`document_nr`),
KEY `notes` (`notes`),
KEY `currency` (`currency`),
KEY `lang` (`lang`),
KEY `ip` (`ip`),
KEY `api_token` (`api_token`),
KEY `referred_by` (`referred_by`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '主机销售-客户';
After replication, you can go to the database to create the database table.
MySQL database table structure design
Displaying 1-34 of 34 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
aid | varchar(255) | 是 | Alternative id for foreign systems | Normal Index | ||
client_group_id | bigint(20) | 是 | Normal Index | |||
role | varchar(30) | client | 否 | client | client | |
auth_type | varchar(255) | 是 | ||||
varchar(255) | 是 | Unique Index | ||||
pass | varchar(255) | 是 | ||||
salt | varchar(255) | 是 | ||||
status | varchar(30) | active | 是 | active, suspended, canceled | active | |
email_approved | tinyint(1) | 是 | ||||
tax_exempt | tinyint(1) | 0 | 是 | 0 | ||
type | varchar(100) | 是 | ||||
first_name | varchar(100) | 是 | ||||
last_name | varchar(100) | 是 | ||||
gender | varchar(20) | 是 | ||||
birthday | date | 是 | ||||
phone_cc | varchar(10) | 是 | ||||
phone | varchar(100) | 是 | ||||
company | varchar(100) | 是 | ||||
company_vat | varchar(100) | 是 | ||||
company_number | varchar(255) | 是 | ||||
address_1 | varchar(100) | 是 | ||||
address_2 | varchar(100) | 是 | ||||
city | varchar(100) | 是 | ||||
state | varchar(100) | 是 | ||||
postcode | varchar(100) | 是 | ||||
country | varchar(100) | 是 | ||||
document_type | varchar(100) | 是 | ||||
document_nr | varchar(20) | 是 | ||||
notes | text | 是 | ||||
currency | varchar(10) | 是 | ||||
lang | varchar(10) | 是 | ||||
ip | varchar(45) | 是 | ||||
api_token | varchar(128) | 是 | ||||
referred_by | varchar(255) | 是 |