Skip to content

Commit

Permalink
SQL and dbicdump config
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Dec 4, 2016
1 parent b448d33 commit a1a4569
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions succession.conf
@@ -0,0 +1,13 @@
schema_class Succession::Schema

<connect_info>
dsn dbi:mysql:succession
user succession
pass 5ucc35510n
</connect_info>

<loader_options>
dump_directory ./lib
components InflateColumn::DateTime
use_moose 1
</loader_options>
21 changes: 21 additions & 0 deletions succession.sql
@@ -0,0 +1,21 @@
drop table if exists person;

create table person (
id integer primary key auto_increment,
name varchar(50) not null,
born date not null,
died date,
parent integer null,
family_order integer,
foreign key (parent) references person(id)
);

drop table if exists sovereign;

create table sovereign (
id integer primary key auto_increment,
start date not null,
end date,
person_id integer not null,
foreign key (person_id) references person(id)
);

0 comments on commit a1a4569

Please sign in to comment.