Commit 5609425d authored by mkanat%kerio.com's avatar mkanat%kerio.com

Bug 296039: [PostgreSQL] Cannot create a new product

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wurblzap, a=myk
parent 7f9a55a1
...@@ -469,7 +469,8 @@ use constant ABSTRACT_SCHEMA => { ...@@ -469,7 +469,8 @@ use constant ABSTRACT_SCHEMA => {
FIELDS => [ FIELDS => [
product_id => {TYPE => 'INT2', NOTNULL => 1}, product_id => {TYPE => 'INT2', NOTNULL => 1},
value => {TYPE => 'varchar(20)', NOTNULL => 1}, value => {TYPE => 'varchar(20)', NOTNULL => 1},
sortkey => {TYPE => 'INT2', NOTNULL => 1}, sortkey => {TYPE => 'INT2', NOTNULL => 1,
DEFAULT => 0},
], ],
INDEXES => [ INDEXES => [
milestones_product_id_idx => {FIELDS => [qw(product_id value)], milestones_product_id_idx => {FIELDS => [qw(product_id value)],
......
...@@ -3960,6 +3960,11 @@ $dbh->bz_alter_column('versions', 'value', ...@@ -3960,6 +3960,11 @@ $dbh->bz_alter_column('versions', 'value',
$dbh->bz_add_index('versions', 'versions_product_id_idx', $dbh->bz_add_index('versions', 'versions_product_id_idx',
{TYPE => 'UNIQUE', FIELDS => [qw(product_id value)]}); {TYPE => 'UNIQUE', FIELDS => [qw(product_id value)]});
# Milestone sortkeys get a default just like all other sortkeys.
if (!exists $dbh->bz_column_info('milestones', 'sortkey')->{DEFAULT}) {
$dbh->bz_alter_column('milestones', 'sortkey',
{TYPE => 'INT2', NOTNULL => 1, DEFAULT => 0});
}
# If you had to change the --TABLE-- definition in any way, then add your # If you had to change the --TABLE-- definition in any way, then add your
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment