From 2fec2d564242518781f99ac5aff8fdd4db0122cc Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 18 Apr 2014 20:17:30 +0300 Subject: [PATCH] Add passphrase and admin fields to users table --- db.sql | 4 +++- lib/Gruntmaster/Data/Result/User.pm | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/db.sql b/db.sql index 01a31f3..6f15c01 100644 --- a/db.sql +++ b/db.sql @@ -5,7 +5,9 @@ CREATE TYPE RUNNER AS ENUM ('File', 'Verifier', 'Interactive'); CREATE TYPE JUDGE AS ENUM ('Absolute', 'Points'); CREATE TABLE users ( - id TEXT PRIMARY KEY, + id TEXT PRIMARY KEY, + passphrase TEXT NOT NULL, + admin BOOLEAN NOT NULL DEFAULT FALSE, name TEXT, -- NOT NULL, email TEXT, -- NOT NULL, phone TEXT, -- NOT NULL, diff --git a/lib/Gruntmaster/Data/Result/User.pm b/lib/Gruntmaster/Data/Result/User.pm index 21edb48..1ae6710 100644 --- a/lib/Gruntmaster/Data/Result/User.pm +++ b/lib/Gruntmaster/Data/Result/User.pm @@ -28,6 +28,17 @@ __PACKAGE__->table("users"); data_type: 'text' is_nullable: 0 +=head2 passphrase + + data_type: 'text' + is_nullable: 0 + +=head2 admin + + data_type: 'boolean' + default_value: false + is_nullable: 0 + =head2 name data_type: 'text' @@ -68,6 +79,10 @@ __PACKAGE__->table("users"); __PACKAGE__->add_columns( "id", { data_type => "text", is_nullable => 0 }, + "passphrase", + { data_type => "text", is_nullable => 0 }, + "admin", + { data_type => "boolean", default_value => \"false", is_nullable => 0 }, "name", { data_type => "text", is_nullable => 1 }, "email", @@ -159,8 +174,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-26 15:24:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HjxrnH2QdWGaAnArZpyYMA +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-04-18 20:16:26 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:r7hVLUd+6MeYZn+8I4S7Cw # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.39.2