Skip to content

Commit

Permalink
Correct column name to avoid name clash b/c SQLT
Browse files Browse the repository at this point in the history
  • Loading branch information
melmothx committed Jan 13, 2024
1 parent a3f89f5 commit 7ca4164
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions lib/AmuseWikiFarm/Schema/Result/Aggregation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ __PACKAGE__->table("aggregation");
is_auto_increment: 1
is_nullable: 0
=head2 uri
=head2 aggregation_uri
data_type: 'varchar'
is_nullable: 0
Expand Down Expand Up @@ -104,7 +104,7 @@ __PACKAGE__->table("aggregation");
__PACKAGE__->add_columns(
"aggregation_id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"uri",
"aggregation_uri",
{ data_type => "varchar", is_nullable => 0, size => 255 },
"name",
{ data_type => "varchar", is_nullable => 0, size => 255 },
Expand Down Expand Up @@ -138,19 +138,22 @@ __PACKAGE__->set_primary_key("aggregation_id");

=head1 UNIQUE CONSTRAINTS
=head2 C<uri_site_id_unique>
=head2 C<aggregation_uri_site_id_unique>
=over 4
=item * L</uri>
=item * L</aggregation_uri>
=item * L</site_id>
=back
=cut

__PACKAGE__->add_unique_constraint("uri_site_id_unique", ["uri", "site_id"]);
__PACKAGE__->add_unique_constraint(
"aggregation_uri_site_id_unique",
["aggregation_uri", "site_id"],
);

=head1 RELATIONS
Expand Down Expand Up @@ -185,8 +188,8 @@ __PACKAGE__->belongs_to(
);


# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-01-13 08:44:33
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nUMeC3DbhhAKPAqwM3ohpw
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-01-13 08:51:59
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OvK/gLRxFR/f+YzIcud0BQ


# You can replace this text with custom code or comments, and it will be preserved on regeneration
Expand Down
4 changes: 2 additions & 2 deletions sql/sqlite.sql
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ CREATE UNIQUE INDEX unique_title_annotation_key ON title_annotation (annotation_

CREATE TABLE aggregation (
aggregation_id INTEGER PRIMARY KEY AUTOINCREMENT,
uri VARCHAR(255) NOT NULL, -- fe-15
aggregation_uri VARCHAR(255) NOT NULL, -- fe-15
name VARCHAR(255) NOT NULL, -- F.E.
-- inside the same name
series_number VARCHAR(255), -- 15
Expand All @@ -778,7 +778,7 @@ CREATE TABLE aggregation (
);
CREATE INDEX aggregation_name_idx ON aggregation(name);

CREATE UNIQUE INDEX unique_aggregation ON aggregation (uri, site_id);
CREATE UNIQUE INDEX unique_aggregation ON aggregation (aggregation_uri, site_id);

CREATE TABLE aggregation_title (
aggregation_id INTEGER NOT NULL REFERENCES aggregation(aggregation_id) ON DELETE CASCADE ON UPDATE CASCADE,
Expand Down

0 comments on commit 7ca4164

Please sign in to comment.