|
Line 0
Link Here
|
| 0 |
- |
1 |
use Modern::Perl; |
|
|
2 |
|
| 3 |
return { |
| 4 |
bug_number => "35471", |
| 5 |
description => "Add column parent_frameworkcode to table biblio_framework", |
| 6 |
up => sub { |
| 7 |
my ($args) = @_; |
| 8 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
| 9 |
|
| 10 |
# Do you stuffs here |
| 11 |
$dbh->do( |
| 12 |
q{ |
| 13 |
ALTER TABLE biblio_framework |
| 14 |
ADD COLUMN parent_frameworkcode VARCHAR(4) DEFAULT NULL AFTER frameworkcode, |
| 15 |
ADD CONSTRAINT biblio_framework_fk_1 FOREIGN KEY (parent_frameworkcode) REFERENCES biblio_framework (frameworkcode) ON DELETE SET NULL ON UPDATE CASCADE |
| 16 |
} |
| 17 |
); |
| 18 |
|
| 19 |
# Print useful stuff here |
| 20 |
# tables |
| 21 |
say $out "Added column 'parent_frameworkcode' to table 'biblio_framework'"; |
| 22 |
}, |
| 23 |
}; |