Source

Portfolio / trike / sql / create_trike.backup.sql

Full commit
create database if not exists trike;

use trike;

create table if not exists program (id int not null auto_increment, name varchar(255) not null default "default", primary key (id)) engine=innodb, default charset="utf8";

create table if not exists file (id int not null auto_increment, program_id int not null default '0', type enum('source','xml') not null default 'source', name varchar(255) not null default 'default', path varchar(255) not null default '/', primary key (id), index pid_idx (program_id), foreign key fk_program_file (program_id) references program (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists xml (id int not null auto_increment, file_id int not null default '0', contents longtext, index fid_idx (file_id), primary key (id), foreign key fk_file_xml (file_id) references file (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists source (id int not null auto_increment, file_id int not null default '0', contents longtext, index fid_idx (file_id), primary key (id), foreign key fk_file_source (file_id) references file (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists errors (id int not null auto_increment, program_id int not null, value text not null default "", index fid_idx (program_id), primary key (id), foreign key fk_program_errors (program_id) references program (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml (id int not null auto_increment, xml_id int not null default '0', cvs_revision varchar(255) default "", primary key (id), foreign key fk_xml_gccxml (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_argument (id int not null auto_increment, xml_id int not null default '0', attributes varchar(255) default "", _default varchar(255) not null default "", name varchar(255) not null default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_argument (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_arraytype (id int not null auto_increment, xml_id int not null default '0', align varchar(255) not null default "", attributes varchar(255) default "", _id varchar(255) not null default "", max varchar(255) not null default "", min tinyint(1) not null default "0", size varchar(255) not null default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_arraytype (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_base (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", type varchar(255) not null default "", virtual enum('0','1') not null default '0', primary key( id), index xid_idx (xml_id), foreign key fk_xml_base (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_class (id int not null auto_increment, xml_id int not null default '0', abstract enum('0','1') not null default '0', access enum("public","private","protected") not null default "public", align varchar(255) default "", artificial varchar(255) default "", attributes varchar(255) default "", bases varchar(255) default "", context varchar(255) not null default "", file varchar(255) not null default "", _id varchar(255) not null default "", incomplete enum('0','1') not null default '0', location varchar(255) not null default "", mangled varchar(255) not null default "", members varchar(255) default "", name varchar(255) not null default "", size varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_class (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_constructor (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", artificial varchar(255) default "", attributes varchar(255) default "", context varchar(255) not null default "", endline varchar(255) default "", extern enum('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", name varchar(255) not null default "", throw varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_constructor (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_converter (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", attributes varchar(255) default "", const enum('0','1') not null default '0', context varchar(255) not null default "", endline varchar(255) default "", extern enum('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", name varchar(255) not null default "", returns varchar(255) not null default "", throw varchar(255) default "", virtual enum('0','1') not null default '0', primary key (id), index xid_idx (xml_id), foreign key fk_xml_converter (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_cvqualifiedtype (id int not null auto_increment, xml_id int not null default '0', align varchar(255) default "", attributes varchar(255) default "", const varchar(255) default "", _id varchar(255) not null default "", _restrict varchar(255) default "", size varchar(255) not null default "", type varchar(255) not null default "", volatile varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_cvqualifiedtype (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_destructor (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", artificial varchar(255) default "", attributes varchar(255) default "", context varchar(255) not null default "", endline varchar(255) default "", extern enum('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", name varchar(255) not null default "", throw varchar(255) default "", virtual enum('0','1') not null default '0', primary key (id), index xid_idx (xml_id), foreign key fk_xml_destructor (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_enumvalue (id int not null auto_increment, xml_id int not null default '0', init varchar(255) not null default "", name varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_enumvalue (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_enumeration (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", align varchar(255) default "", artificial varchar(255) default "", attributes varchar(255) default "", context varchar(255) not null default "", file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", name varchar(255) not null default "", size varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_enumeration (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_field (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", attributes varchar(255) default "", bits varchar(255) default "", context varchar(255) not null default "", file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) default "", mutable enum('0','1') not null default '0', name varchar(255) not null default "", offset varchar(255) default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_field (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_file (id int not null auto_increment, xml_id int not null default '0', fid int not null default '0', fname varchar(255) not null default 'default', primary key (id), index xid_idx (xml_id), foreign key fk_xml_gccxml_file (xml_id) references xml(id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_function (id int not null auto_increment, xml_id int not null default '0', attributes varchar(255) default "", context varchar(255) not null default "", endline varchar(255) default "", extern enum('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) default "", name varchar(255) not null default "", returns varchar(255) not null default "", throw varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_function (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_functiontype (id int not null auto_increment, xml_id int not null default '0', attributes varchar(255) default "", _id varchar(255) not null default "", returns varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_functiontype (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_fundamentaltype (id int not null auto_increment, xml_id int not null default '0',align varchar(255) default "", attributes varchar(255) default "", _id varchar(255) not null default "", name varchar(255) not null default "", size varchar(255) default "", primary key (id), foreign key fk_xml_method (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_method (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", attributes varchar(255) default "", const enum('0','1') not null default '0', context varchar(255) not null default "", endline varchar(255) default "", extern enum ('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", name varchar(255) not null default "", pure_virtual enum('0','1') not null default '0', returns varchar(255) not null default "", static enum('0','1') not null default '0', throw varchar(255) default "", virtual enum('0','1') not null default '0', primary key (id), index xid_idx (xml_id), foreign key fk_xml_method (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_methodtype (id int not null auto_increment, xml_id int not null default '0', attributes varchar(255) default "", basetype varchar(255) not null default "", _id varchar(255) not null default "", returns varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_method (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_namespace (id int not null auto_increment, xml_id int not null default '0', attributes varchar(255) default "", context varchar(255) default "", _id varchar(255) not null default "", mangled varchar(255) default "", members varchar(255) default "", name varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_namespace (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_namespacealias (id int not null auto_increment, xml_id int not null default '0', context varchar(255) default "", _id varchar(255) not null default "", mangled varchar(255) default "", name varchar(255) not null default "", namespace varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_namespacealias (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_offsettype (id int not null auto_increment, xml_id int not null default '0', align varchar(255) default "", attributes varchar(255) default "", _id varchar(255) not null default "", basetype varchar(255) not null default "", size varchar(255) default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_offsettype (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_operatorfunction (id int not null auto_increment, xml_id int not null default '0', attributes varchar(255) default "", context varchar(255) not null default "", endline varchar(255) default "", extern enum('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", name varchar(255) not null default "", returns varchar(255) not null default "", throw varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_operatorfunction (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_operatormethod (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", attributes varchar(255) default "", const enum('0','1') not null default '0', context varchar(255) not null default "", endline varchar(255) default "", extern enum('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", name varchar(255) not null default "", pure_virtual enum('0','1') not null default '0', returns varchar(255) not null default "", static enum('0','1') not null default '0', throw varchar(255) default "", virtual enum('0','1') not null default '0', primary key (id), index xid_idx (xml_id), foreign key fk_xml_operatormethod (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_pointertype (id int not null auto_increment, xml_id int not null default '0', align varchar(255) default "", attributes varchar(255) default "", _id varchar(255) not null default "", size varchar(255) default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_pointertype (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_referencetype (id int not null auto_increment, xml_id int not null default '0', align varchar(255) default "", attributes varchar(255) default "", _id varchar(255) not null default "", size varchar(255) default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_referencetype (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_struct (id int not null auto_increment, xml_id int not null default '0', aSbstract enum('0','1') not null default '0', access enum("public","private","protected") not null default "public", align varchar(255) default "", artificial enum('0','1') not null default '0', attributes varchar(255) default "", bases varchar(255) default "", context varchar(255) not null default "", file varchar(255) not null default "", _id varchar(255) not null default "", incomplete enum('0','1') not null default '0', line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", members varchar(255) default "", name varchar(255) default "", size varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_struct (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_typedef (id int not null auto_increment, xml_id int not null default '0', attributes varchar(255) default "", context varchar(255) not null default "", file varchar(255) not null default "", _id varchar(255) not null default "", line varchar(255) not null default "", location varchar(255) not null default "", name varchar(255) not null default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_typedef (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_unimplemented (id int not null auto_increment, xml_id int not null default '0', function varchar(255) default "", _id varchar(255) not null default "", node varchar(255) not null default "", tree_code enum('187','190','193') not null default '187', tree_code_name enum("template_type_param","typename_type","using_decl") not null default "template_type_param", primary key (id), foreign key fk_xml_unimplemented (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_union (id int not null auto_increment, xml_id int not null default '0', abstract enum('0','1') not null default '0', access enum("public","private","protected") not null default "public", align varchar(255) default "", artificial enum('0','1') not null default '0', attributes varchar(255) default "", bases varchar(255) default "", context varchar(255) not null default "", file varchar(255) not null default "", _id varchar(255) not null default "", incomplete enum('0','1') not null default '0', line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) not null default "", members varchar(255) default "", name varchar(255) default "", size varchar(255) default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_union (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';

create table if not exists gccxml_variable (id int not null auto_increment, xml_id int not null default '0', access enum("public","private","protected") not null default "public", artificial varchar(255) default "", attributes varchar(255) default "", context varchar(255) not null default "", extern enum('0','1') not null default '0', file varchar(255) not null default "", _id varchar(255) not null default "", init varchar(255) default "", line varchar(255) not null default "", location varchar(255) not null default "", mangled varchar(255) default "", name varchar(255) not null default "", type varchar(255) not null default "", primary key (id), index xid_idx (xml_id), foreign key fk_xml_variable (xml_id) references xml (id) on delete cascade) engine=innodb, default charset='utf8';