mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
19 lines
906 B
SQL
19 lines
906 B
SQL
CREATE TABLE `staff` (
|
|
`staff_id` tinyint(3) unsigned NOT NULL auto_increment,
|
|
`first_name` varchar(45) NOT NULL,
|
|
`last_name` varchar(45) NOT NULL,
|
|
`address_id` smallint(5) unsigned NOT NULL,
|
|
`picture` blob,
|
|
`email` varchar(50) default NULL,
|
|
`store_id` tinyint(3) unsigned NOT NULL,
|
|
`active` tinyint(1) NOT NULL default '1',
|
|
`username` varchar(16) NOT NULL,
|
|
`password` varchar(40) character set utf8 collate utf8_bin default NULL,
|
|
`last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`staff_id`),
|
|
KEY `idx_fk_store_id` (`store_id`),
|
|
KEY `idx_fk_address_id` (`address_id`),
|
|
CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE,
|
|
CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|