All Downloads are FREE. Search and download functionalities are using the official Maven repository.

db.migrate-db2.V19__RedirectionUrlLength-DB2.sql Maven / Gradle / Ivy

There is a newer version: 7.1.7
Show newest version
--
-- Copyright (C) 2019-2024 Philip Helger and contributors
-- philip[at]helger[dot]com
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
--         http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--

-- This is not allowed in DB2
-- ALTER TABLE smp_service_metadata_red ALTER COLUMN redirectionUrl SET DATA TYPE CLOB NOT NULL;

-- Alternative steps to do:
-- Rename existing column to new name (col1)
ALTER TABLE smp_service_metadata_red RENAME COLUMN redirectionUrl TO old1;

-- create column with requested name of CLOB type (col2)
ALTER TABLE smp_service_metadata_red ADD COLUMN redirectionUrl CLOB NOT NULL default 'placeholder';
ALTER TABLE smp_service_metadata_red ALTER COLUMN redirectionUrl DROP DEFAULT;

-- copy from new column (col1) to "old column" (col2)
UPDATE smp_service_metadata_red SET redirectionUrl = old1;

-- delete new column (col1)
ALTER TABLE smp_service_metadata_red DROP COLUMN old1;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy