-- -------------------- -------------------- ------------- -- Table sm

 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
-- -----------------------------------------------------
-- Table `smi`.`newsmedia`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `smi`.`newsmedia` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`rusname` VARCHAR(60) NULL ,
`url` VARCHAR(255) NULL ,
`logo` VARCHAR(255) NULL ,
# `favicon` VARCHAR(255) NULL ,
`rank_alexa` INT NULL ,
`rank_google` INT NULL ,
`rank_yandex` INT NULL ,
`creation_time` TIMESTAMP NULL ,
`update_time` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Дата обновления рейтингов' ,
`user` INT UNSIGNED NOT NULL ,
`approved` TINYINT(1) NOT NULL DEFAULT FALSE ,
`description` TEXT NULL ,
PRIMARY KEY (`id`) ,
INDEX `fk_newsmedia_users1` (`user` ASC) ,
CONSTRAINT `fk_newsmedia_users1`
FOREIGN KEY (`user` )
REFERENCES `smi`.`users` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;