mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 23:45:27 +00:00
[3969] Addressed review comments
This commit is contained in:
1
src/bin/admin/scripts/pgsql/.gitignore
vendored
Normal file
1
src/bin/admin/scripts/pgsql/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
upgrade_1.0_to_2.0.sh
|
@@ -13,7 +13,9 @@
|
|||||||
-- NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
-- NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||||
-- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
-- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
-- This is the Kea DHCP schema specification for PostgreSQL.
|
-- This is the Kea DHCP schema specification for PostgreSQL schema 1.0.
|
||||||
|
-- It is used to create a 1.0 schema database for testing kea-admin's
|
||||||
|
-- ability to upgrade Postgres databases.
|
||||||
|
|
||||||
-- The schema is reasonably portable (with the exception of some field types
|
-- The schema is reasonably portable (with the exception of some field types
|
||||||
-- specification, which are PostgreSQL-specific). Minor changes might be needed
|
-- specification, which are PostgreSQL-specific). Minor changes might be needed
|
||||||
@@ -86,7 +88,7 @@ INSERT INTO lease6_types VALUES (1, 'IA_TA'); -- Temporary v6 addresses
|
|||||||
INSERT INTO lease6_types VALUES (2, 'IA_PD'); -- Prefix delegations
|
INSERT INTO lease6_types VALUES (2, 'IA_PD'); -- Prefix delegations
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- Finally, the version of the schema. We start at 0.1 during development.
|
-- Finally, the version of the schema. We start at 1.0 during development.
|
||||||
-- This table is only modified during schema upgrades. For historical reasons
|
-- This table is only modified during schema upgrades. For historical reasons
|
||||||
-- (related to the names of the columns in the BIND 10 DNS database file), the
|
-- (related to the names of the columns in the BIND 10 DNS database file), the
|
||||||
-- first column is called "version" and not "major".
|
-- first column is called "version" and not "major".
|
||||||
|
@@ -122,7 +122,7 @@ pgsql_upgrade_test() {
|
|||||||
# Wipe the whole database
|
# Wipe the whole database
|
||||||
pgsql_wipe
|
pgsql_wipe
|
||||||
|
|
||||||
# Initialize database to scheme 1.0.
|
# Initialize database to schema 1.0.
|
||||||
pgsql_execute_script @abs_top_srcdir@/src/bin/admin/tests/dhcpdb_create_1.0.pgsql
|
pgsql_execute_script @abs_top_srcdir@/src/bin/admin/tests/dhcpdb_create_1.0.pgsql
|
||||||
assert_eq 0 $? "cannot initialize the database, expected exit code: %d, actual: %d"
|
assert_eq 0 $? "cannot initialize the database, expected exit code: %d, actual: %d"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user