From a8e608acd3314b5f6d523d3c3c7f2806bb0bf9a6 Mon Sep 17 00:00:00 2001 From: Nick Palladino Date: Wed, 20 Jul 2022 15:11:17 -0400 Subject: [PATCH 1/2] Added sorghum and hemp --- .../db/migration/V0.5.36__add-new-species.sql | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/resources/db/migration/V0.5.36__add-new-species.sql diff --git a/src/main/resources/db/migration/V0.5.36__add-new-species.sql b/src/main/resources/db/migration/V0.5.36__add-new-species.sql new file mode 100644 index 000000000..d6cac5494 --- /dev/null +++ b/src/main/resources/db/migration/V0.5.36__add-new-species.sql @@ -0,0 +1,30 @@ +/* + * See the NOTICE file distributed with this work for additional information + * regarding copyright ownership. + * + * 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. + */ + +DO $$ +DECLARE +user_id UUID; +BEGIN + +user_id := (SELECT id FROM bi_user WHERE name = 'system'); + +insert into species (common_name, description, created_by, updated_by) +values + ('Sorghum', 'Sorghum is a genus of about 25 species of flowering plants in the grass family (Poaceae).', user_id, user_id), + ('Hemp', 'Hemp is a class of Cannabis cultivars grown specifically for industrial use.', user_id, user_id); + +END $$; \ No newline at end of file From 4466d1af400deec9f9059cca7630fb2521fbe983 Mon Sep 17 00:00:00 2001 From: Nick Palladino Date: Wed, 20 Jul 2022 15:11:17 -0400 Subject: [PATCH 2/2] Added sorghum and hemp --- .../db/migration/V0.5.36__add-new-species.sql | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/resources/db/migration/V0.5.36__add-new-species.sql diff --git a/src/main/resources/db/migration/V0.5.36__add-new-species.sql b/src/main/resources/db/migration/V0.5.36__add-new-species.sql new file mode 100644 index 000000000..d6cac5494 --- /dev/null +++ b/src/main/resources/db/migration/V0.5.36__add-new-species.sql @@ -0,0 +1,30 @@ +/* + * See the NOTICE file distributed with this work for additional information + * regarding copyright ownership. + * + * 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. + */ + +DO $$ +DECLARE +user_id UUID; +BEGIN + +user_id := (SELECT id FROM bi_user WHERE name = 'system'); + +insert into species (common_name, description, created_by, updated_by) +values + ('Sorghum', 'Sorghum is a genus of about 25 species of flowering plants in the grass family (Poaceae).', user_id, user_id), + ('Hemp', 'Hemp is a class of Cannabis cultivars grown specifically for industrial use.', user_id, user_id); + +END $$; \ No newline at end of file