Skip to content

Commit

Permalink
Expand aggregation model
Browse files Browse the repository at this point in the history
  • Loading branch information
melmothx committed Jan 13, 2024
1 parent 7ca4164 commit 5308cb1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
18 changes: 13 additions & 5 deletions lib/AmuseWikiFarm/Schema/Result/Aggregation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package AmuseWikiFarm::Schema::Result::Aggregation;

=head1 NAME
AmuseWikiFarm::Schema::Result::Aggregation
AmuseWikiFarm::Schema::Result::Aggregation - Aggregations
=cut

Expand Down Expand Up @@ -44,13 +44,19 @@ __PACKAGE__->table("aggregation");
is_auto_increment: 1
is_nullable: 0
=head2 aggregation_code
data_type: 'varchar'
is_nullable: 0
size: 255
=head2 aggregation_uri
data_type: 'varchar'
is_nullable: 0
size: 255
=head2 name
=head2 aggregation_name
data_type: 'varchar'
is_nullable: 0
Expand Down Expand Up @@ -104,9 +110,11 @@ __PACKAGE__->table("aggregation");
__PACKAGE__->add_columns(
"aggregation_id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"aggregation_code",
{ data_type => "varchar", is_nullable => 0, size => 255 },
"aggregation_uri",
{ data_type => "varchar", is_nullable => 0, size => 255 },
"name",
"aggregation_name",
{ data_type => "varchar", is_nullable => 0, size => 255 },
"series_number",
{ data_type => "varchar", is_nullable => 1, size => 255 },
Expand Down Expand Up @@ -188,8 +196,8 @@ __PACKAGE__->belongs_to(
);


# 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
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-01-13 09:21:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1hA0FBKGbmWN6Kkq5aWX/g


# You can replace this text with custom code or comments, and it will be preserved on regeneration
Expand Down
6 changes: 3 additions & 3 deletions lib/AmuseWikiFarm/Schema/Result/AggregationTitle.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package AmuseWikiFarm::Schema::Result::AggregationTitle;

=head1 NAME
AmuseWikiFarm::Schema::Result::AggregationTitle
AmuseWikiFarm::Schema::Result::AggregationTitle - Linking table for aggregations
=cut

Expand Down Expand Up @@ -99,8 +99,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:MOob6o5qgaZ55MT8FqAZZA
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-01-13 09:21:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sWGh42sQQufnaBcfGb18lQ


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

CREATE TABLE aggregation (
aggregation_id INTEGER PRIMARY KEY AUTOINCREMENT,
aggregation_code VARCHAR(255) NOT NULL, -- fe, the parent
aggregation_uri VARCHAR(255) NOT NULL, -- fe-15
name VARCHAR(255) NOT NULL, -- F.E.
aggregation_name VARCHAR(255) NOT NULL, -- F.E.
-- inside the same name
series_number VARCHAR(255), -- 15
-- and if the series number are not integers:
Expand All @@ -776,8 +777,8 @@ CREATE TABLE aggregation (
site_id VARCHAR(16) NOT NULL REFERENCES site(id)
ON DELETE CASCADE ON UPDATE CASCADE
);
CREATE INDEX aggregation_name_idx ON aggregation(name);

CREATE INDEX aggregation_code_idx ON aggregation(aggregation_code);
CREATE INDEX aggregation_uri_idx ON aggregation(aggregation_uri);
CREATE UNIQUE INDEX unique_aggregation ON aggregation (aggregation_uri, site_id);

CREATE TABLE aggregation_title (
Expand Down Expand Up @@ -839,6 +840,8 @@ INSERT INTO table_comments (table_name, comment_text)
('oai_pmh_set', 'OAI-PMH Sets definition'),
('oai_pmh_record', 'OAI-PMH Records'),
('oai_pmh_record_set', 'OAI-PMH brigde table between records and sets'),
('aggregation', 'Aggregations'),
('aggregation_title', 'Linking table for aggregations'),
('included_file', 'Files included in muse documents'),
('include_path', 'Directories to search for file inclusions')
;
Expand Down

0 comments on commit 5308cb1

Please sign in to comment.