CREATE TABLE runs (
run_idx BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
run_id BINARY(16) NOT NULL,
[...]
UNIQUE(run_id)
);
CREATE TABLE run_fields (
run_field_idx BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
run_id BINARY(16) NOT NULL,
[...]
FOREIGN KEY (run_id) REFERENCES runs(run_id) ON DELETE CASCADE
);
CREATE TABLE jobs (
job_idx BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
job_key BINARY(16) NOT NULL,
[...]
UNIQUE(job_key)
);
CREATE TABLE job_parameters (
job_parameters_idx BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
job_key BINARY(16) NOT NULL REFERENCES jobs(job_key) ON DELETE CASCADE,
[...]
UNIQUE(job_key)
);
When I load this into MariaDB and then dump the schema the xxx_parameter relationships dump fine, but when I load into Percona mysql they are omitted. Here are the diffs:
diff lib/App/Yath/Schema/MySQL/Run.pm lib/App/Yath/Schema/Percona/Run.pm
2c2
< package App::Yath::Schema::MySQL::Run;
---
> package App::Yath::Schema::Percona::Run;
54c54
< default_value => "current_timestamp()",
---
> default_value => \"current_timestamp",
131,136d130
< __PACKAGE__->might_have(
< "run_parameter",
< "App::Yath::Schema::Result::RunParameter",
< { "foreign.run_id" => "self.run_id" },
< { cascade_copy => 0, cascade_delete => 1 },
< );
151c145
< # Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-05-15 16:47:33
---
> # Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-05-15 16:47:39
166c160
< App::Yath::Schema::MySQL::Run - Autogenerated result class for Run in MySQL.
---
> App::Yath::Schema::Percona::Run - Autogenerated result class for Run in Percona.
diff lib/App/Yath/Schema/MySQL/Job.pm lib/App/Yath/Schema/Percona/Job.pm
2c2
< package App::Yath::Schema::MySQL::Job;
---
> package App::Yath::Schema::Percona::Job;
107,112d106
< __PACKAGE__->might_have(
< "job_parameter",
< "App::Yath::Schema::Result::JobParameter",
< { "foreign.job_key" => "self.job_key" },
< { cascade_copy => 0, cascade_delete => 1 },
< );
138c132
< # Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-05-15 16:47:33
---
> # Created by DBIx::Class::Schema::Loader v0.07052 @ 2024-05-15 16:47:39
141d134
< __PACKAGE__->inflate_column('job_id' => { inflate => \&uuid_inflate, deflate => \&uuid_deflate });
142a136
> __PACKAGE__->inflate_column('job_id' => { inflate => \&uuid_inflate, deflate => \&uuid_deflate });
155c149
< App::Yath::Schema::MySQL::Job - Autogenerated result class for Job in MySQL.
---
> App::Yath::Schema::Percona::Job - Autogenerated result class for Job in Percona.
Relevent Schema:
When I load this into MariaDB and then dump the schema the xxx_parameter relationships dump fine, but when I load into Percona mysql they are omitted. Here are the diffs:
The only difference I am aware of is MariaDB vs Percona. I am happy to post the full schema and how I am generating things if that is necessary.