mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 16:44:17 +02:00
PostgreSQL: Add IF EXISTS to DROP SEQUENCE in export (bug #595)
This commit is contained in:
@@ -715,7 +715,7 @@ AND typelem = 0"
|
|||||||
? "SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = " . q($sequence_name)
|
? "SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = " . q($sequence_name)
|
||||||
: "SELECT * FROM $sequence_name"
|
: "SELECT * FROM $sequence_name"
|
||||||
));
|
));
|
||||||
$sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE $sequence_name;\n" : "")
|
$sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE IF EXISTS $sequence_name;\n" : "")
|
||||||
. "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value] START " . ($auto_increment ? $sq['last_value'] : 1) . " CACHE $sq[cache_value];";
|
. "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value] START " . ($auto_increment ? $sq['last_value'] : 1) . " CACHE $sq[cache_value];";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ Shorten JSON values in select (bug #594)
|
|||||||
Speed up alter table (regression from 4.4.0)
|
Speed up alter table (regression from 4.4.0)
|
||||||
PostgreSQL: Fix exporting string default values
|
PostgreSQL: Fix exporting string default values
|
||||||
PostgreSQL: Fix exporting sequences in PostgreSQL 10
|
PostgreSQL: Fix exporting sequences in PostgreSQL 10
|
||||||
|
PostgreSQL: Add IF EXISTS to DROP SEQUENCE in export (bug #595)
|
||||||
|
|
||||||
Adminer 4.6.1 (released 2018-02-09):
|
Adminer 4.6.1 (released 2018-02-09):
|
||||||
Sticky position of table actions
|
Sticky position of table actions
|
||||||
|
Reference in New Issue
Block a user