Merge branch '34-tablas-script-de-migracion-integria-4389' into 'develop'

Add titem, tmap, trel_item tables to migration 6 - 6.1 script - #34

See merge request !92
This commit is contained in:
Enrique Camargo 2017-01-31 15:41:32 +01:00
commit 7fde04ebb3
1 changed files with 63 additions and 0 deletions

View File

@ -1,3 +1,66 @@
-- ---------------------------------------------------------------------
-- Table `titem`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `titem` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_map` int(10) unsigned NOT NULL default 0,
`x` INTEGER NOT NULL default 0,
`y` INTEGER NOT NULL default 0,
`z` INTEGER NOT NULL default 0,
`deleted` INTEGER(1) unsigned NOT NULL default 0,
`type` INTEGER UNSIGNED NOT NULL default 0,
`refresh` INTEGER UNSIGNED NOT NULL default 0,
`source` INTEGER UNSIGNED NOT NULL default 0,
`source_data` varchar(250) default '',
`options` TEXT,
`style` TEXT,
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tmap`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tmap` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_group` int(10) unsigned NOT NULL default 0,
`id_user` varchar(250) NOT NULL default '',
`type` int(10) unsigned NOT NULL default 0,
`subtype` int(10) unsigned NOT NULL default 0,
`name` varchar(250) default '',
`description` TEXT,
`height` INTEGER UNSIGNED NOT NULL default 0,
`width` INTEGER UNSIGNED NOT NULL default 0,
`center_x` INTEGER NOT NULL default 0,
`center_y` INTEGER NOT NULL default 0,
`background` varchar(250) default '',
`background_options` INTEGER UNSIGNED NOT NULL default 0,
`source_period` INTEGER UNSIGNED NOT NULL default 0,
`source` INTEGER UNSIGNED NOT NULL default 0,
`source_data` varchar(250) default '',
`generation_method` INTEGER UNSIGNED NOT NULL default 0,
`generated` INTEGER UNSIGNED NOT NULL default 0,
`filter` TEXT,
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `trel_item`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `trel_item` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_parent` int(10) unsigned NOT NULL default 0,
`id_child` int(10) unsigned NOT NULL default 0,
`id_map` int(10) unsigned NOT NULL default 0,
`id_parent_source_data` int(10) unsigned NOT NULL default 0,
`id_child_source_data` int(10) unsigned NOT NULL default 0,
`parent_type` int(10) unsigned NOT NULL default 0,
`child_type` int(10) unsigned NOT NULL default 0,
`id_item` int(10) unsigned NOT NULL default 0,
`deleted` int(1) unsigned NOT NULL default 0,
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `talert_templates`
-- ---------------------------------------------------------------------