Зарегистрироваться

/* create table users ( ID int NOT NULL AUTO_INCREMENT, Name varchar(30) NULL, Email varchar(30) NULL, Pass varchar(30) NULL, Role int DEFAULT 0, PRIMARY KEY (ID) ) create table genres ( ID int NOT NULL AUTO_INCREMENT, Name varchar(30) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table motives ( ID int NOT NULL AUTO_INCREMENT, Name varchar(100) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) ALTER TABLE motives MODIFY Name VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; create table plots ( ID int NOT NULL AUTO_INCREMENT, Name varchar(100) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table collectors ( ID int NOT NULL AUTO_INCREMENT, Name varchar(30) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table translators ( ID int NOT NULL AUTO_INCREMENT, Name varchar(30) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table archives ( ID int NOT NULL AUTO_INCREMENT, Name varchar(300) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table publications ( ID int NOT NULL AUTO_INCREMENT, Name varchar(300) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table places ( ID int NOT NULL AUTO_INCREMENT, Name varchar(30) NULL COLLATE utf8mb4_general_ci, Longitude real NULL, Latitude real NULL, District int NOT NULL, PRIMARY KEY (ID) ) create table plot_to_motive ( plotID int not null, motiveID int not null ) CREATE TABLE informants ( ID int NOT NULL AUTO_INCREMENT, Name varchar(100) NULL COLLATE utf8mb4_general_ci, BirthDate int NULL, BirthPlace int NULL, Photo varchar(40) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table texts ( ID int NOT NULL AUTO_INCREMENT, Year int default NULL, Place int DEFAULT NULL, OriginalText LONGTEXT NULL COLLATE utf8mb4_general_ci, Translation LONGTEXT NULL COLLATE utf8mb4_general_ci, Comment TEXT(3000) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table text_details ( textID int not null, detailType int not null, detailID int not null ) detailType --> 1 - genre, 2 - plot, 3 - motive, 4 - informant, 5 - collector, 6 - translator, 7 - archive, 8 - publication drop TABLE text_details; drop TABLE texts; drop TABLE translators; drop TABLE publications; drop TABLE plot_to_motive; drop TABLE plots; drop TABLE motives; drop TABLE places; drop TABLE informants; drop TABLE collectors; drop TABLE archives; */