Permalink
Browse files

change er modell to support tags

  • Loading branch information...
1 parent 694ff1d commit d0b2a88892b9de2ec03408369132abee9918330f @reneeb committed Apr 16, 2011
@@ -177,9 +177,9 @@ CREATE TABLE `opr_tags` (
PRIMARY KEY(tag_id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
-DROP TABLE IF EXISTS `package_tags`;
+DROP TABLE IF EXISTS `opr_package_tags`;
-CREATE TABLE `package_tags` (
+CREATE TABLE `opr_package_tags` (
name_id INTEGER NOT NULL,
tag_id INTEGER NOT NULL,
PRIMARY KEY(name_id,tag_id)
@@ -13,10 +13,10 @@ __PACKAGE__->add_columns( qw/
__PACKAGE__->set_primary_key( qw/ name_id / );
-__PACKAGE__->has_many( opr_package_author => 'OTRS::OPR::DB::Schema::Result::opr_package_author',
+__PACKAGE__->has_many( opr_package_tags => 'OTRS::OPR::DB::Schema::Result::opr_package_tags',
{ 'foreign.name_id' => 'self.name_id' });
-__PACKAGE__->has_many( package_tags => 'OTRS::OPR::DB::Schema::Result::package_tags',
+__PACKAGE__->has_many( opr_package_author => 'OTRS::OPR::DB::Schema::Result::opr_package_author',
{ 'foreign.name_id' => 'self.name_id' });
__PACKAGE__->has_many( opr_package => 'OTRS::OPR::DB::Schema::Result::opr_package',
@@ -13,7 +13,7 @@ __PACKAGE__->add_columns( qw/
__PACKAGE__->set_primary_key( qw/ tag_id / );
-__PACKAGE__->has_many( package_tags => 'OTRS::OPR::DB::Schema::Result::package_tags',
+__PACKAGE__->has_many( opr_package_tags => 'OTRS::OPR::DB::Schema::Result::opr_package_tags',
{ 'foreign.tag_id' => 'self.tag_id' });

0 comments on commit d0b2a88

Please sign in to comment.