-
Notifications
You must be signed in to change notification settings - Fork 4
Development Policy
Please make really sure that your commits are correct and contain the files you expect.
Please use relevant commit messages and don't repeat them literally if you fix a mistake in an earlier commit.
Before pushing any non-trivial changes, run
RELEASE_TESTING=1 make test
and fix any errors that show up from these tests.
Add/update version numbers to style sheets after changing them. This ensure that HTML stays in sync with CSS.
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.css?v=46" />
NOTE: The following rules do not apply to many_to_many relationship bridges.
If the relationship is to a column in a foreign class (i.e. not back to the calling class) then by default the accessor name should be the same as the foreign class name. For example in Zone we have:
__PACKAGE__->has_many(
"ZoneCountry", "Interchange6::Schema::Result::ZoneCountry",
"zones_id", { cascade_copy => 0, cascade_delete => 0 },
);
If you have several relationships to the same foreign class then the accessor name can be prefixed in order to make the relationship clear. For example in order we have ShippingAddress and Billing Address:
__PACKAGE__->belongs_to(
"ShippingAddress",
"Interchange6::Schema::Result::Address",
{ addresses_id => "shipping_addresses_id" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
__PACKAGE__->belongs_to(
"BillingAddress",
"Interchange6::Schema::Result::Address",
{ addresses_id => "billing_addresses_id" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
These rules are checked by t/schema_sanity.t
when make test is run with RELEASE_TESTING=1.
The schema_sanity tests also check for size
when it is required and also that column definitions across relationships are compatible (amongst other things).