try fix pg enums
continuous-integration/drone/push Build is passing Details

pull/10/head
Arthur VALIN 1 year ago
parent 4a7f695d10
commit fc9449de60

@ -38,12 +38,18 @@ class PostgresDataSource : AllInDataSource() {
database.Execute( database.Execute(
""" """
CREATE TYPE IF not exists betstatus AS ENUM DO ${'$'}${'$'}
('InProgress', 'Waiting', 'Closing', 'Finished', 'Cancelled'); BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'betstatus') THEN
CREATE TYPE IF not exists bettype AS ENUM CREATE TYPE IF not exists betstatus AS ENUM
('Match', 'Binary', 'Custom'); ('InProgress', 'Waiting', 'Closing', 'Finished', 'Cancelled');
END IF;
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'bettype') THEN
CREATE TYPE IF not exists bettype AS ENUM
('Match', 'Binary', 'Custom');
END IF;
END${'$'}${'$'};
CREATE TABLE IF not exists bet ( CREATE TABLE IF not exists bet (
id uuid PRIMARY KEY, id uuid PRIMARY KEY,
theme VARCHAR(255), theme VARCHAR(255),

Loading…
Cancel
Save