core/api/modules/main/install_sqlite3.php

21 lines
611 B
PHP
Executable File

<?php
\DB::set("CREATE TABLE IF NOT EXISTS `strana` (
`id` INTEGER PRIMARY KEY NOT NULL,
`txt` TEXT
);");
\DB::set("CREATE TABLE IF NOT EXISTS `region` (
`id` INTEGER PRIMARY KEY NOT NULL,
`region` TEXT,
`strana_id` TEXT,
FOREIGN KEY (`strana_id`) REFERENCES `strana` (`id`));");
\DB::set("CREATE TABLE IF NOT EXISTS `city` (
`id` INTEGER PRIMARY KEY NOT NULL,
`city` TEXT,
`region_id` INTEGER,
`strana_id` TEXT,
FOREIGN KEY (`strana_id`) REFERENCES `strana` (`id`),
FOREIGN KEY (`region_id`) REFERENCES `region` (`id`));");
?>