Commit 75f332f1 authored by Leo Gordon's avatar Leo Gordon
Browse files

Make this patch less mysql-dependent. Needs testing with PostgreSQL.

parent 0132988d
......@@ -4,15 +4,15 @@ CREATE TABLE hive_meta (
meta_key VARCHAR(80) NOT NULL PRIMARY KEY,
meta_value TEXT
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
);
-- INSERT the 'hive_sql_schema_version' for the first time, then keep UPDATE'ing
INSERT INTO hive_meta (meta_key, meta_value) VALUES ('hive_sql_schema_version', '49');
-- move 'hive_use_triggers' into hive_meta:
INSERT IGNORE INTO hive_meta (meta_key, meta_value) SELECT 'hive_use_triggers', COALESCE(MIN(REPLACE(meta_value, '"', '')), 0) FROM meta WHERE meta_key='hive_use_triggers';
INSERT INTO hive_meta (meta_key, meta_value) SELECT 'hive_use_triggers', COALESCE(MIN(REPLACE(meta_value, '"', '')), 0) FROM meta WHERE meta_key='hive_use_triggers';
-- move 'pipeline_name' into hive_meta and rename it into 'hive_pipeline_name':
INSERT IGNORE INTO hive_meta (meta_key, meta_value) SELECT 'hive_pipeline_name', REPLACE(meta_value,'"','') FROM meta WHERE meta_key='pipeline_name' or meta_key='name';
INSERT INTO hive_meta (meta_key, meta_value) SELECT 'hive_pipeline_name', REPLACE(meta_value,'"','') FROM meta WHERE meta_key='pipeline_name' or meta_key='name';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment