Improve tests #138
This commit is contained in:
parent
ef21128099
commit
75b37d5a88
@ -225,7 +225,7 @@ SELECT CDB_CartodbfyTable('original');
|
|||||||
DROP TABLE original_renamed;
|
DROP TABLE original_renamed;
|
||||||
DROP TABLE original;
|
DROP TABLE original;
|
||||||
|
|
||||||
-- Table always have a default seq value after cartodbfy #123
|
-- Table always have a default seq value after cartodbfy #138
|
||||||
CREATE TABLE bug_empty_table_no_seq (
|
CREATE TABLE bug_empty_table_no_seq (
|
||||||
cartodb_id integer,
|
cartodb_id integer,
|
||||||
the_geom geometry(Geometry,4326),
|
the_geom geometry(Geometry,4326),
|
||||||
@ -233,10 +233,28 @@ CREATE TABLE bug_empty_table_no_seq (
|
|||||||
name text,
|
name text,
|
||||||
description text
|
description text
|
||||||
);
|
);
|
||||||
SELECT CDB_CartodbfyTable('bug_empty_table_no_seq');
|
SELECT CDB_CartodbfyTableCheck('bug_empty_table_no_seq', 'Table always have a default seq value after cartodbfy #138');
|
||||||
INSERT INTO bug_empty_table_no_seq DEFAULT VALUES;
|
INSERT INTO bug_empty_table_no_seq DEFAULT VALUES;
|
||||||
DROP TABLE bug_empty_table_no_seq;
|
DROP TABLE bug_empty_table_no_seq;
|
||||||
|
|
||||||
|
-- Existing cartodb_id values are respected
|
||||||
|
CREATE table existing_cartodb_id (
|
||||||
|
cartodb_id integer,
|
||||||
|
the_geom geometry(Geometry,4326),
|
||||||
|
the_geom_webmercator geometry(Geometry,3857),
|
||||||
|
name text,
|
||||||
|
description text
|
||||||
|
);
|
||||||
|
INSERT INTO existing_cartodb_id (cartodb_id, description) VALUES
|
||||||
|
(1, 'a'),
|
||||||
|
(2, 'b'),
|
||||||
|
(3, 'c');
|
||||||
|
SELECT CDB_CartodbfyTableCheck('existing_cartodb_id', 'Existing cartodb_id values are respected #138');
|
||||||
|
SELECT * from existing_cartodb_id;
|
||||||
|
DROP TABLE existing_cartodb_id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- TODO: table with existing custom-triggered the_geom
|
-- TODO: table with existing custom-triggered the_geom
|
||||||
|
|
||||||
DROP FUNCTION CDB_CartodbfyTableCheck(regclass, text);
|
DROP FUNCTION CDB_CartodbfyTableCheck(regclass, text);
|
||||||
|
@ -59,8 +59,15 @@ original
|
|||||||
DROP TABLE
|
DROP TABLE
|
||||||
DROP TABLE
|
DROP TABLE
|
||||||
CREATE TABLE
|
CREATE TABLE
|
||||||
bug_empty_table_no_seq
|
Table always have a default seq value after cartodbfy #138 cartodbfied fine
|
||||||
INSERT 0 1
|
INSERT 0 1
|
||||||
DROP TABLE
|
DROP TABLE
|
||||||
|
CREATE TABLE
|
||||||
|
INSERT 0 3
|
||||||
|
Existing cartodb_id values are respected #138 cartodbfied fine
|
||||||
|
1|||a|
|
||||||
|
2|||b|
|
||||||
|
3|||c|
|
||||||
|
DROP TABLE
|
||||||
DROP FUNCTION
|
DROP FUNCTION
|
||||||
DROP FUNCTION
|
DROP FUNCTION
|
||||||
|
Loading…
Reference in New Issue
Block a user