* Cleaned up the foreign key constraints.

* Generate SQLite and PostgreSQL schemas from hydra.sql.
This commit is contained in:
Eelco Dolstra
2009-10-21 12:25:43 +00:00
parent 2cf42489e2
commit 686b6271d2
24 changed files with 276 additions and 240 deletions

View File

@@ -48,11 +48,6 @@ __PACKAGE__->add_columns(
},
);
__PACKAGE__->set_primary_key("name");
__PACKAGE__->has_many(
"builds",
"Hydra::Schema::Builds",
{ "foreign.project" => "self.name" },
);
__PACKAGE__->belongs_to("owner", "Hydra::Schema::Users", { username => "owner" });
__PACKAGE__->has_many(
"jobsets",
@@ -64,6 +59,11 @@ __PACKAGE__->has_many(
"Hydra::Schema::Jobs",
{ "foreign.project" => "self.name" },
);
__PACKAGE__->has_many(
"builds",
"Hydra::Schema::Builds",
{ "foreign.project" => "self.name" },
);
__PACKAGE__->has_many(
"views",
"Hydra::Schema::Views",
@@ -76,8 +76,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-15 23:14:39
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N6NPLJfc1gKM4zz6dS5PJw
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-21 14:17:55
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XcrLhOH+WuO24UFulGft1w
# You can replace this text with custom content, and it will be preserved on regeneration