Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added database schema

  • Loading branch information...
commit 08d0b26744d61c17d33a60915d0a965d39dcb353 1 parent d32923f
Dave Cross authored
Showing with 27 additions and 0 deletions.
  1. +27 −0 db/twittelect.sql
27 db/twittelect.sql
View
@@ -0,0 +1,27 @@
+create table list_owner (
+ id integer primary key,
+ name varchar(200) not null
+);
+
+create table party (
+ id integer primary key,
+ name varchar(200) not null
+);
+
+create table constituency (
+ id integer primary key,
+ name varchar(200) not null,
+ list_owner_id integer not null,
+ foreign key (list_owner_id) references list_owner(id)
+);
+
+create table candidate (
+ id integer primary key,
+ name varchar(200) not null,
+ twitter varchar(200),
+ party_id integer not null,
+ constituency_id integer,
+ current_mp integer not null default 0,
+ foreign key (party_id) references party(id),
+ foreign key (constituency_id) references constituency(id)
+);
Please sign in to comment.
Something went wrong with that request. Please try again.