CREATE TABLE `car_alters` (
`company` text NOT NULL,
`series` text NOT NULL,
`number` text NOT NULL,
`date` text NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`company`,`series`,`number`,`date`,`description`)
)
CREATE TABLE `car_historys` (
`company` text NOT NULL,
`series` text NOT NULL,
`type_code` text NOT NULL,
`type_number` text NOT NULL,
`number` text NOT NULL,
`formation` int NOT NULL DEFAULT '0',
`order` int NOT NULL DEFAULT '0',
`in_date` text NOT NULL,
`in_type` text NOT NULL,
`in_subjoinder` text NOT NULL,
`out_date` text NOT NULL,
`out_type` text NOT NULL,
`out_subjoinder` text NOT NULL,
`first_location` text NOT NULL,
`jusha` text NOT NULL,
`factory` text NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`company`,`series`,`number`)
)
CREATE TABLE `car_moves` (
`company` text NOT NULL,
`series` text NOT NULL,
`number` text NOT NULL,
`date` text NOT NULL,
`new_location` text NOT NULL,
PRIMARY KEY (`company`,`series`,`number`,`date`)
)