blabla
Sql
code posted
by
test
created at 22 Nov 16:10
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
CREATE TABLE IF NOT EXISTS `cdas`.`saved_search` ( `search_id` BIGINT NOT NULL AUTO_INCREMENT , `channel_id` BIGINT NOT NULL , `product_id` BIGINT NOT NULL , `search_term` VARCHAR(255) NOT NULL , `created_date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP , `modified_date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP , `usage_counter` BIGINT NULL DEFAULT 0 , `fit_id` BIGINT UNSIGNED NULL , `search_statistics_id` BIGINT NOT NULL , PRIMARY KEY (`search_id`, `channel_id`) , CONSTRAINT `fk_saved_search_search_statistics1` FOREIGN KEY (`search_statistics_id` ) REFERENCES `cdas`.`search_statistics` (`id` ) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_saved_search_channel1` FOREIGN KEY (`channel_id` ) REFERENCES `cdas`.`channel` (`channel_id` ) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_saved_search_product1` FOREIGN KEY (`product_id` ) REFERENCES `cdas`.`product` (`product_id` ) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB |
1.03 KB in 3 ms with coderay