]> Frank Brehm's Git Trees - books.git/commitdiff
Änderungen am Datenmodell
authorFrank Brehm <frank@brehm-online.com>
Thu, 18 Dec 2008 13:01:54 +0000 (13:01 +0000)
committerFrank Brehm <frank@brehm-online.com>
Thu, 18 Dec 2008 13:01:54 +0000 (13:01 +0000)
lib/FrBr/Books/Db/Autoren.pm
lib/FrBr/Books/Db/Buecher.pm
lib/FrBr/Books/Db/UserAdd.pm [new file with mode: 0644]
lib/FrBr/Books/Db/Users.pm

index fc1714616e7a0a4fdf6c3853202944f0a975e3ce..d4e1903f3e575c8d17483b32143794660e335994 100644 (file)
@@ -22,10 +22,8 @@ __PACKAGE__->add_columns(
 __PACKAGE__->set_primary_key("id");
 __PACKAGE__->add_unique_constraint( "name", [ "nachname", "vorname", "mittelname", "name_suffix" ] );
 
-
-# Created by DBIx::Class::Schema::Loader v0.04004 @ 2008-03-17 17:53:52
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QwPjYKNwUnR5b418xxulDg
-
+__PACKAGE__->has_many( 'autor_buch' => 'FrBr::Books::Db::Autor2Buch', { 'foreign.autor_id' => 'self.id' } );
+__PACKAGE__->many_to_many( 'buecher' => 'autor_buch', 'buch' );
 
 # You can replace this text with custom content, and it will be preserved on regeneration
 1;
index a7979de9a5f2293e976c7bf2ec03c89b50602f68..46e4c7d6d87cb13af4b0f2c5dceef6671e526636 100644 (file)
@@ -34,11 +34,9 @@ __PACKAGE__->might_have( 'verlag'      => 'FrBr::Books::Db::Verlage',       { 'f
 __PACKAGE__->might_have( 'ort'         => 'FrBr::Books::Db::Orte',          { 'foreign.id' => 'self.orts_id' } );
 __PACKAGE__->might_have( 'bindungsart' => 'FrBr::Books::Db::Bindungsarten', { 'foreign.id' => 'self.bindungsart_id' } );
 
-# Created by DBIx::Class::Schema::Loader v0.04004 @ 2008-03-17 17:53:52
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GjY80NXBYER1XlWgPukp+A
+__PACKAGE__->has_many( 'autor_buch' => 'FrBr::Books::Db::Autor2Buch', { 'foreign.buch_id' => 'self.id' } );
+__PACKAGE__->many_to_many( 'autoren' => 'autor_buch', 'autor' );
 
-
-# You can replace this text with custom content, and it will be preserved on regeneration
 1;
 
 __END__
diff --git a/lib/FrBr/Books/Db/UserAdd.pm b/lib/FrBr/Books/Db/UserAdd.pm
new file mode 100644 (file)
index 0000000..83aee31
--- /dev/null
@@ -0,0 +1,26 @@
+package FrBr::Books::Db::UserAdd;
+
+# $Id$
+# $URL$
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("Core");
+__PACKAGE__->table("user_add");
+__PACKAGE__->add_columns(
+  "user_id"      => { data_type => "INT",  default_value => undef, is_nullable => 0, size => 10 },
+  "comments"     => { data_type => "TEXT", default_value => undef, is_nullable => 0, size => 65535, },
+);
+__PACKAGE__->set_primary_key("user_id");
+
+__PACKAGE__->might_have( 'user' => 'FrBr::Books::Db::Users', { 'foreign.user_id' => 'self.user_id' } );
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+1;
+
+__END__
+
+# vim: noai : ts=4 fenc=utf-8 filetype=perl expandtab :
index e4beabc26cfe3bd530b25452f6f173ffb51c3c32..9359ee89d0b615ed97abf2e1b4f92565832b1d10 100644 (file)
@@ -22,7 +22,6 @@ __PACKAGE__->add_columns(
   "deleted"      => { data_type => "ENUM",     default_value => "n",   is_nullable => 0, size => 1 },
   "enabled"      => { data_type => "ENUM",     default_value => "y",   is_nullable => 0, size => 1 },
   "admin_status" => { data_type => "ENUM",     default_value => "n",   is_nullable => 0, size => 1 },
-  "comments"     => { data_type => "TEXT",     default_value => undef, is_nullable => 0, size => 65535, },
 );
 __PACKAGE__->set_primary_key("user_id");
 __PACKAGE__->add_unique_constraint("login", ["login"]);