Permalink
Browse files

Using PG now

  • Loading branch information...
1 parent 1c510c1 commit baf5edfe63d57555ffc46268d9ed23fd2b5d310f @kthakore committed Mar 8, 2011
Showing with 2,365 additions and 159 deletions.
  1. +6 −10 implementation/SIMS/SIMS/lib/SIMS/Controller/Meeting.pm
  2. +0 −10 implementation/SIMS/SIMS/lib/SIMS/Controller/Root.pm
  3. +6 −5 implementation/SIMS/SIMS/lib/SIMS/Model/DB.pm
  4. +2 −2 implementation/SIMS/SIMS/lib/SIMS/Schema.pm
  5. +90 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Event.pm
  6. +100 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Fund.pm
  7. +164 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Meeting.pm
  8. +131 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/MeetingAdvisor.pm
  9. +127 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/MeetingComment.pm
  10. +93 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/MeetingConfirmation.pm
  11. +79 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Plan.pm
  12. +96 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/PlanStudent.pm
  13. +83 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Report.pm
  14. +86 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Role.pm
  15. +215 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Student.pm
  16. +96 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/StudentSupervisor.pm
  17. +114 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Supervisor.pm
  18. +101 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/Term.pm
  19. +96 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/TermFunding.pm
  20. +96 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/TermStudent.pm
  21. +153 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/User.pm
  22. +96 −0 implementation/SIMS/SIMS/lib/SIMS/Schema/Result/UserRole.pm
  23. +0 −29 implementation/SIMS/SIMS/lib/SIMS/Schema/ResultSet/Student.pm
  24. +0 −23 implementation/SIMS/SIMS/lib/SIMS/Schema/ResultSet/User.pm
  25. +289 −0 implementation/SIMS/SIMS/pgsql.sql
  26. +10 −3 implementation/SIMS/SIMS/root/templates/hello_pdf.tt
  27. +2 −2 implementation/SIMS/SIMS/script/encode_pass.pl
  28. +3 −3 implementation/SIMS/SIMS/script/update_db.pl
  29. BIN implementation/SIMS/SIMS/sims.db
  30. +31 −72 implementation/SIMS/SIMS/sims.sql
@@ -83,13 +83,9 @@ sub base : Chained('/') PathPart('meeting') CaptureArgs(1) {
sub pdf : Chained('base') : PathPart('pdf') : Args(0) {
my ( $self, $c ) = @_;
- if ( $c->stash->{meeting}->student_sign() ) {
-
- my $uri_img = _create_jpeg_sign( $c->stash->{meeting}->student_sign() );
- $c->stash->{student_sign_jpeg} = $uri_img;
- $c->log->debug( "Made " . $uri_img );
-
- }
+ my $uri_img = _create_jpeg_sign( $c->stash->{meeting}->student_sign() );
+ $c->stash->{student_sign_jpeg} = $uri_img;
+ $c->log->debug( "Made " . $uri_img );
$c->stash->{pdf_template} = 'hello_pdf.tt';
$c->forward('View::PDF::Reuse');
@@ -373,11 +369,11 @@ sub index : Chained('base') : PathPart('') : Args(0) {
}
sub _create_jpeg_sign {
- my $json_string = shift;
+ my $json_string = shift || '[{"lx":0,"ly":10,"mx":200,"my":10}]';
my $videodriver = $ENV{SDL_VIDEODRIVER};
$ENV{SDL_VIDEODRIVER} = 'dummy' unless $ENV{SDL_RELEASE_TESTING};
- my $app = SDLx::App->new( width => 200, height => 50 );
+ my $app = SDLx::App->new( width => 200, height => 50, init => SDL_INIT_VIDEO);
$app->draw_rect( [ 0, 0, $app->w, $app->h ], 0xFFFFFFFF );
my $sign = decode_json($json_string);
@@ -406,7 +402,7 @@ sub _create_jpeg_sign {
delete $ENV{SDL_VIDEODRIVER};
}
- return abs_path($dir. $rand_pic . '.jpg');
+ return abs_path( $dir . $rand_pic . '.jpg' );
}
@@ -14,16 +14,6 @@ __PACKAGE__->config( namespace => '' );
SIMS::Controller::Root - Root Controller for SIMS
-=head1 DESCRIPTION
-
-[enter your description here]
-
-=head1 METHODS
-
-=head2 index
-
-The root page (/)
-
=cut
sub index : Path : Args(0) {
@@ -5,11 +5,12 @@ use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
schema_class => 'SIMS::Schema',
-
+
connect_info => {
- dsn => 'dbi:SQLite:dbname=sims.db',
- user => '',
- password => '',
+ dsn => 'dbi:Pg:dbname=SIMS;host=127.0.0.1;',
+ user => 'SIMS',
+ password => 'SIMS',
+ quote_char => q{"},
}
);
@@ -27,7 +28,7 @@ L<Catalyst::Model::DBIC::Schema> Model using schema L<SIMS::Schema>
=head1 GENERATED BY
-Catalyst::Helper::Model::DBIC::Schema - 0.43
+Catalyst::Helper::Model::DBIC::Schema - 0.48
=head1 AUTHOR
@@ -14,8 +14,8 @@ extends 'DBIx::Class::Schema';
__PACKAGE__->load_namespaces;
-# Created by DBIx::Class::Schema::Loader v0.07002 @ 2010-11-09 08:02:37
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GW3M1eRkr0EKj2yQLLS2Ww
+# Created by DBIx::Class::Schema::Loader v0.07002 @ 2011-03-07 23:32:06
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dr16QI2oINDjtI7l33SN2g
# You can replace this text with custom content, and it will be preserved on regeneration
@@ -26,6 +26,90 @@ __PACKAGE__->table("Event");
=head2 id
data_type: 'integer'
+ is_nullable: 0
+
+=head2 ref_id
+
+ data_type: 'integer'
+ is_nullable: 0
+
+=head2 refers_to
+
+ data_type: 'text'
+ is_nullable: 1
+
+=head2 type
+
+ data_type: 'text'
+ is_nullable: 1
+
+=head2 timestamp
+
+ data_type: 'timestamp'
+ is_nullable: 0
+
+=head2 description
+
+ data_type: 'text'
+ is_nullable: 1
+
+=cut
+
+__PACKAGE__->add_columns(
+ "id",
+ { data_type => "integer", is_nullable => 0 },
+ "ref_id",
+ { data_type => "integer", is_nullable => 0 },
+ "refers_to",
+ { data_type => "text", is_nullable => 1 },
+ "type",
+ { data_type => "text", is_nullable => 1 },
+ "timestamp",
+ { data_type => "timestamp", is_nullable => 0 },
+ "description",
+ { data_type => "text", is_nullable => 1 },
+);
+__PACKAGE__->set_primary_key("id");
+
+
+# Created by DBIx::Class::Schema::Loader v0.07002 @ 2011-03-07 23:32:06
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S8ZFs7vQmrnhvcWbaEdZkg
+# These lines were loaded from '/home/kthakore/.perl5/perls/perl-5.12.2/lib/site_perl/5.12.2/SIMS/Schema/Result/Event.pm' found in @INC.
+# They are now part of the custom portion of this file
+# for you to hand-edit. If you do not either delete
+# this section or remove that file from @INC, this section
+# will be repeated redundantly when you re-create this
+# file again via Loader! See skip_load_external to disable
+# this feature.
+
+package SIMS::Schema::Result::Event;
+
+# Created by DBIx::Class::Schema::Loader
+# DO NOT MODIFY THE FIRST PART OF THIS FILE
+
+use strict;
+use warnings;
+
+use Moose;
+use MooseX::NonMoose;
+use namespace::autoclean;
+extends 'DBIx::Class::Core';
+
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp", "EncodedColumn");
+
+=head1 NAME
+
+SIMS::Schema::Result::Event
+
+=cut
+
+__PACKAGE__->table("Event");
+
+=head1 ACCESSORS
+
+=head2 id
+
+ data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
@@ -81,3 +165,9 @@ __PACKAGE__->add_unique_constraint("ref_id_unique", ["ref_id"]);
# You can replace this text with custom content, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;
+# End of lines loaded from '/home/kthakore/.perl5/perls/perl-5.12.2/lib/site_perl/5.12.2/SIMS/Schema/Result/Event.pm'
+
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+__PACKAGE__->meta->make_immutable;
+1;
@@ -26,6 +26,100 @@ __PACKAGE__->table("Fund");
=head2 id
data_type: 'integer'
+ is_nullable: 0
+
+=head2 type
+
+ data_type: 'text'
+ is_nullable: 1
+
+=head2 value
+
+ data_type: 'numeric'
+ is_nullable: 1
+
+=head2 start
+
+ data_type: 'date'
+ is_nullable: 1
+
+=head2 end
+
+ data_type: 'date'
+ is_nullable: 1
+
+=cut
+
+__PACKAGE__->add_columns(
+ "id",
+ { data_type => "integer", is_nullable => 0 },
+ "type",
+ { data_type => "text", is_nullable => 1 },
+ "value",
+ { data_type => "numeric", is_nullable => 1 },
+ "start",
+ { data_type => "date", is_nullable => 1 },
+ "end",
+ { data_type => "date", is_nullable => 1 },
+);
+__PACKAGE__->set_primary_key("id");
+
+=head1 RELATIONS
+
+=head2 term_fundings
+
+Type: has_many
+
+Related object: L<SIMS::Schema::Result::TermFunding>
+
+=cut
+
+__PACKAGE__->has_many(
+ "term_fundings",
+ "SIMS::Schema::Result::TermFunding",
+ { "foreign.fund_id" => "self.id" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
+
+# Created by DBIx::Class::Schema::Loader v0.07002 @ 2011-03-07 23:32:06
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SbvbA1+ntLUK8e1HNwpK7A
+# These lines were loaded from '/home/kthakore/.perl5/perls/perl-5.12.2/lib/site_perl/5.12.2/SIMS/Schema/Result/Fund.pm' found in @INC.
+# They are now part of the custom portion of this file
+# for you to hand-edit. If you do not either delete
+# this section or remove that file from @INC, this section
+# will be repeated redundantly when you re-create this
+# file again via Loader! See skip_load_external to disable
+# this feature.
+
+package SIMS::Schema::Result::Fund;
+
+# Created by DBIx::Class::Schema::Loader
+# DO NOT MODIFY THE FIRST PART OF THIS FILE
+
+use strict;
+use warnings;
+
+use Moose;
+use MooseX::NonMoose;
+use namespace::autoclean;
+extends 'DBIx::Class::Core';
+
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp", "EncodedColumn");
+
+=head1 NAME
+
+SIMS::Schema::Result::Fund
+
+=cut
+
+__PACKAGE__->table("Fund");
+
+=head1 ACCESSORS
+
+=head2 id
+
+ data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
@@ -90,3 +184,9 @@ __PACKAGE__->has_many(
# You can replace this text with custom content, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;
+# End of lines loaded from '/home/kthakore/.perl5/perls/perl-5.12.2/lib/site_perl/5.12.2/SIMS/Schema/Result/Fund.pm'
+
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+__PACKAGE__->meta->make_immutable;
+1;
Oops, something went wrong. Retry.

0 comments on commit baf5edf

Please sign in to comment.