We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc6be7e commit 4b4ffeaCopy full SHA for 4b4ffea
app/service/sql/init_table_device_plant.sh
@@ -7,16 +7,16 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$MEASUREMENTS_DB"
7
IF NOT EXISTS dev.device_plant (
8
id_device VARCHAR(32) PRIMARY KEY,
9
id_plant INT UNIQUE NOT NULL,
10
- plant_type SMALLINT NOT NULL,
+ plant_type VARCHAR(70) NOT NULL,
11
id_user INT NOT NULL
12
);
13
14
DO $do$ BEGIN
15
IF (SELECT COUNT(*) FROM dev.device_plant) = 0 THEN
16
INSERT INTO dev.device_plant (id_device, id_plant, plant_type, id_user) VALUES
17
- ('fd7c7531467748539f99d2bcef076c88', 1, 1, 1),
18
- ('fd8c7531467748539f99d2bcef076c88', 2, 2, 2),
19
- ('fd9c7531467748539f99d2bcef076c88', 3, 3, 3);
+ ('fd7c7531467748539f99d2bcef076c88', 1, 'Passiflora caerulea', 1),
+ ('fd8c7531467748539f99d2bcef076c88', 2, 'Kalanchoe daigremontiana', 2),
+ ('fd9c7531467748539f99d2bcef076c88', 3, 'Dracaena fragrans', 3);
20
END IF;
21
END $do$;
22
EOSQL
0 commit comments