Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
e0a74d5d
Commit
e0a74d5d
authored
Jul 09, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 451219: Allow altering from one SERIAL type to another on PostgreSQL,
for people upgrading Testopia from 1.3 to 2.0+. r=mkanat, a=mkanat (module owner)
parent
ba3ebf7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Pg.pm
Bugzilla/DB/Schema/Pg.pm
+2
-1
No files found.
Bugzilla/DB/Schema/Pg.pm
View file @
e0a74d5d
...
...
@@ -134,9 +134,10 @@ sub _get_alter_type_sql {
if
(
$type
=~
/serial/i
&&
$old_def
->
{
TYPE
}
!~
/serial/i
)
{
die
(
"You cannot specify a DEFAULT on a SERIAL-type column."
)
if
$new_def
->
{
DEFAULT
};
$type
=~
s/serial/integer/i
;
}
$type
=~
s/\bserial\b/integer/i
;
# On Pg, you don't need UNIQUE if you're a PK--it creates
# two identical indexes otherwise.
$type
=~
s/unique//i
if
$new_def
->
{
PRIMARYKEY
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment