From de24123e4e82c43df8a1c5a7c16b7fed22e25e02 Mon Sep 17 00:00:00 2001 From: Max Shaposhnik Date: Wed, 12 Jun 2019 09:26:04 +0300 Subject: [PATCH] Remove non-null constraints from some devfile fields; (#13516) --- .../2__devfile_make_some_fields_optional.sql | 16 ++++++++++++++++ .../2__devfile_make_some_fields_optional.sql | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/2__devfile_make_some_fields_optional.sql create mode 100644 wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/mysql/2__devfile_make_some_fields_optional.sql diff --git a/wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/2__devfile_make_some_fields_optional.sql b/wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/2__devfile_make_some_fields_optional.sql new file mode 100644 index 0000000000..ad1205efea --- /dev/null +++ b/wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/2__devfile_make_some_fields_optional.sql @@ -0,0 +1,16 @@ +-- +-- Copyright (c) 2012-2019 Red Hat, Inc. +-- This program and the accompanying materials are made +-- available under the terms of the Eclipse Public License 2.0 +-- which is available at https://www.eclipse.org/legal/epl-2.0/ +-- +-- SPDX-License-Identifier: EPL-2.0 +-- +-- Contributors: +-- Red Hat, Inc. - initial API and implementation +-- + +ALTER TABLE devfile_entrypoint ALTER COLUMN parent_name DROP NOT NULL; +ALTER TABLE devfile_entrypoint ALTER COLUMN container_name DROP NOT NULL; + +ALTER TABLE devfile_action ALTER COLUMN component DROP NOT NULL; diff --git a/wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/mysql/2__devfile_make_some_fields_optional.sql b/wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/mysql/2__devfile_make_some_fields_optional.sql new file mode 100644 index 0000000000..b7d5e69fc5 --- /dev/null +++ b/wsmaster/che-core-sql-schema/src/main/resources/che-schema/7.0.0-beta8.0-RC2.0/mysql/2__devfile_make_some_fields_optional.sql @@ -0,0 +1,17 @@ +-- +-- Copyright (c) 2012-2019 Red Hat, Inc. +-- This program and the accompanying materials are made +-- available under the terms of the Eclipse Public License 2.0 +-- which is available at https://www.eclipse.org/legal/epl-2.0/ +-- +-- SPDX-License-Identifier: EPL-2.0 +-- +-- Contributors: +-- Red Hat, Inc. - initial API and implementation +-- + +ALTER TABLE devfile_entrypoint + MODIFY COLUMN parent_name VARCHAR(255) NULL DEFAULT NULL, + MODIFY COLUMN container_name VARCHAR(255) NULL DEFAULT NULL; + +ALTER TABLE devfile_action MODIFY COLUMN component VARCHAR(255) NULL DEFAULT NULL;