Merge branch 'release-v-0.0.6' into fix-geom_geoid_colname
This commit is contained in:
commit
cf7c115a76
@ -33,7 +33,8 @@ def select_star(tablename):
|
||||
|
||||
cdb = Dumpr('observatory.cartodb.com','')
|
||||
|
||||
metadata = ['obs_table', 'obs_column_table', 'obs_column', 'obs_column_tag', 'obs_tag', 'obs_column_to_column']
|
||||
metadata = ['obs_table', 'obs_column_table', 'obs_column', 'obs_column_tag',
|
||||
'obs_tag', 'obs_column_to_column', 'obs_dump_version']
|
||||
|
||||
fixtures = [
|
||||
('us.census.tiger.census_tract', 'us.census.tiger.census_tract', '2014'),
|
||||
|
@ -199,3 +199,20 @@ BEGIN
|
||||
RETURN result;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
-- Function that returns the currently deployed obs_dump_version from the
|
||||
-- remote table of the same name.
|
||||
|
||||
CREATE OR REPLACE FUNCTION cdb_observatory.OBS_DumpVersion(
|
||||
)
|
||||
RETURNS TEXT
|
||||
AS $$
|
||||
DECLARE
|
||||
result text;
|
||||
BEGIN
|
||||
EXECUTE '
|
||||
SELECT MAX(dump_id) FROM observatory.obs_dump_version
|
||||
' INTO result;
|
||||
RETURN result;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
@ -114,7 +114,7 @@ BEGIN
|
||||
AND
|
||||
observatory.OBS_column.type = 'Geometry'
|
||||
AND
|
||||
$1 && bounds::box2d
|
||||
ST_Intersects($1, observatory.obs_table.the_geom)
|
||||
$string$ || timespan_query
|
||||
USING geom;
|
||||
RETURN;
|
||||
|
@ -27,3 +27,6 @@ t
|
||||
_obs_standardizemeasurename_test
|
||||
t
|
||||
(1 row)
|
||||
obs_dumpversion_notnull
|
||||
t
|
||||
(1 row)
|
||||
|
1
src/pg/test/fixtures/drop_fixtures.sql
vendored
1
src/pg/test/fixtures/drop_fixtures.sql
vendored
@ -6,6 +6,7 @@ DROP TABLE IF EXISTS observatory.obs_column;
|
||||
DROP TABLE IF EXISTS observatory.obs_column_tag;
|
||||
DROP TABLE IF EXISTS observatory.obs_tag;
|
||||
DROP TABLE IF EXISTS observatory.obs_column_to_column;
|
||||
DROP TABLE IF EXISTS observatory.obs_dump_version;
|
||||
DROP TABLE IF EXISTS observatory.obs_65f29658e096ca1485bf683f65fdbc9f05ec3c5d;
|
||||
DROP TABLE IF EXISTS observatory.obs_1746e37b7cd28cb131971ea4187d42d71f09c5f3;
|
||||
DROP TABLE IF EXISTS observatory.obs_1a098da56badf5f32e336002b0a81708c40d29cd;
|
||||
|
18902
src/pg/test/fixtures/load_fixtures.sql
vendored
18902
src/pg/test/fixtures/load_fixtures.sql
vendored
File diff suppressed because one or more lines are too long
@ -75,4 +75,7 @@ SELECT cdb_observatory._OBS_GetRelatedColumn(
|
||||
-- should give back a standardized measure name
|
||||
SELECT cdb_observatory._OBS_StandardizeMeasureName('test 343 %% 2 qqq }}{{}}') = 'test_343_2_qqq' As _OBS_StandardizeMeasureName_test;
|
||||
|
||||
SELECT cdb_observatory.OBS_DumpVersion()
|
||||
IS NOT NULL AS OBS_DumpVersion_notnull;
|
||||
|
||||
\i test/fixtures/drop_fixtures.sql
|
||||
|
Loading…
Reference in New Issue
Block a user