Commit Graph

246 Commits

Author SHA1 Message Date
Sandro Santilli
651bb8cdb7 Add instructions about adding a test 2014-06-04 10:40:18 +02:00
Sandro Santilli
a92d7d7d37 Add cdb_extension_reload() utility function 2014-06-04 10:31:03 +02:00
Sandro Santilli
c286727181 Add note about extension needing to be installed before it can be upgraded to 2014-06-04 10:16:42 +02:00
Sandro Santilli
d762da1ca2 Add section about updating cartodb extension
CDB-3049
2014-06-04 10:13:35 +02:00
Sandro Santilli
a650c951c8 Add link to pg_schema_triggers fork 2014-06-03 16:26:05 +02:00
Sandro Santilli
9230ffa925 Include revision info in cdb_version() output
Closes #34

NOTE: it will only work if "make" is run from within a git clone
2014-06-03 13:20:49 +02:00
Sandro Santilli
ce20009fb2 Workaround PostgreSQL bug possibly triggering infinite loops
Implements casting of existing system column values during
cartodbfication using ALTER rather than UPDATE.

It's faster for tables with many rows and works around a
longstanding PostgreSQL bug. See
http://www.postgresql.org/message-id/20140530143150.GA11051@localhost

CDB-3059
2014-05-30 19:24:19 +02:00
Sandro Santilli
cc9cbdb7a7 Typo 2014-05-30 18:35:08 +02:00
Sandro Santilli
ac53d6b000 Formatting only change 2014-05-30 12:22:54 +02:00
Sandro Santilli
f5ad0d0434 Fully qualify call to CDB_UserDataSize from quota trigger 2014-05-28 17:42:11 +02:00
Sandro Santilli
bfd56f0ea6 Fully qualify call to cdb_disable_ddl_hooks from cdb_enable_ddl_hooks 2014-05-28 12:53:22 +02:00
Sandro Santilli
7483f8d10b Update NEWS file (0.1.1 will likely not happen) 2014-05-28 12:32:30 +02:00
Sandro Santilli
004c3c5543 Ensure cartodb_id uses an associated sequence
Closes #33
2014-05-28 10:45:42 +02:00
Sandro Santilli
d1990f1765 Provide upgrade paths
Mainly from 0.1.0 and 0.1.1
Includes 0.2.0dev to next and back
2014-05-28 09:48:32 +02:00
Sandro Santilli
2601364011 Fix recursive DDL trigger on create table
Closes #32
2014-05-28 09:02:02 +02:00
Sandro Santilli
85cc74b4f4 Do not install cartodb_version.sql in system dirs 2014-05-27 15:51:45 +02:00
Sandro Santilli
2ffa13af58 Add tool to create upgrades 2014-05-23 18:16:10 +02:00
Sandro Santilli
09cf368d62 Move DDL triggers and extension postamble under scripts-available
Target 0.2.0
2014-05-23 17:40:14 +02:00
Sandro Santilli
213cf0aee2 Set version to 0.1.0 again 2014-05-23 17:09:36 +02:00
Sandro Santilli
b2b93a362f Encode dependency of cartodb_version.sql on Makefile 2014-05-23 16:58:26 +02:00
Sandro Santilli
348177d23a Fix cartodbfication of already-cartodbfied tables in presence of views
Closes #30
Includes testcase
2014-05-23 16:54:36 +02:00
Sandro Santilli
50c5cd676c Encode dependency of cartodb.control on Makefile 2014-05-23 16:43:01 +02:00
Sandro Santilli
e9c6728e8e Back to 0.1.0dev version (aborted final) 2014-05-23 16:10:03 +02:00
Sandro Santilli
102e8bd018 Improve error message on failing CDB_CartodbfyTable 2014-05-23 16:04:54 +02:00
Sandro Santilli
fe008b952d Set version to 0.1.0 2014-05-23 15:33:11 +02:00
Sandro Santilli
5602edd207 Make time interval test not dependent on intervalstyle
Fixes testing from under cartodb/lib/sql
2014-05-22 16:32:15 +02:00
Sandro Santilli
967b7abec0 Try to retain existing cartodb_id values
Also reset sequence when original cartodb_id values correctly
cast to integers, and does not keep a backup in that case.

Closes #27
2014-05-22 14:11:09 +02:00
Sandro Santilli
134d2d29b6 Try to cast TEXT typed updated_at and created_at if present
If the cast fails we'll still rename those fields and create
new ones. See #27 (cartodb_id is still not done)
2014-05-22 13:10:42 +02:00
Sandro Santilli
75a40c9b63 Tag CDB_TableMetadata as a configuration table
Closes #21
2014-05-22 12:32:52 +02:00
Sandro Santilli
8a8d198ea2 Do not enable DDL triggers on extension create
Use cartodb.cdb_enable_ddl_hooks() to enable them.
Closes #19
2014-05-22 11:40:01 +02:00
Sandro Santilli
0082138503 Do not force DROP FUNCTION but rely on CREATE OR REPLACE
We'll bet on no old signature being left around.

Presence of an old signature would break at runtime
with a message like:
ERROR:  function CDB_UserTables() is not unique

Closes #25
2014-05-20 16:39:18 +02:00
Sandro Santilli
eecab6e24c Remove CDB_SearchPath.sql from the set of scripts loaded directly
It still gets loaded as part of extension creation
2014-05-19 13:26:01 +02:00
Sandro Santilli
21e68081f9 Fix extension requires directive 2014-05-16 11:39:15 +02:00
Sandro Santilli
2f0031e6a2 Do not call CDB_Invalidate_Varnish() if not owned by a superuser
Search for that function in schemas cartodb and public (in that order).
Closes #24
2014-05-14 19:03:20 +02:00
Sandro Santilli
ca4ce102bb Refuse to create new extension if legacy code is present on database
Closes #20
2014-05-14 12:39:53 +02:00
Sandro Santilli
02575155ce Complain if script is sourced in psql, rather than via CREATE EXTENSION 2014-05-14 11:30:41 +02:00
Sandro Santilli
fdc58cde73 Migrate user quota on cartodb extension creation from unpackaged
See #18
2014-05-13 17:03:00 +02:00
Sandro Santilli
8d6188e282 Have _CDB_UserQuotaInBytes() take precedence over parameter-based quota
Closes #16
2014-05-12 13:37:47 +02:00
Sandro Santilli
f98071cdac Do not allow cartodbfying tables while no user quota is set
Closes #17
Updates tests
2014-05-12 13:27:44 +02:00
Sandro Santilli
e6b02de9aa Disable roles creation in extension-less installs 2014-05-12 11:44:44 +02:00
Sandro Santilli
cfd8dbc5a4 Test calls to CDB_Invalidate_Varnish
Also drops the DELETE trigger on CDB_TableMetadata as the call to
CDB_Invalidate_Varnish would then get an OID, which is pretty useless.
Closes #8
2014-05-09 17:34:18 +02:00
Sandro Santilli
b69ded8f66 Let CDB_CheckQuota second parameter override configured user quota
Closes #13
Includes automated test
2014-05-09 12:55:41 +02:00
Sandro Santilli
1643ae2db1 Sleep less in the DDL hooks test
Closes #9
Hopefully travis is not too slow to fail this...
2014-05-09 11:34:24 +02:00
Sandro Santilli
402d04baf4 Update instructions to install in existing cartodb databases
Mentions postgis extension needs to be created from unpackaged when
migrating existing cartodb databases. See #6.
2014-05-08 19:01:32 +02:00
Sandro Santilli
155844cbc6 Add travis badge
Closes #4 (now succeeds)
2014-05-08 17:24:17 +02:00
Sandro Santilli
4c93f75523 Fix clean rule not to drop CDB_version() method 2014-05-08 17:21:41 +02:00
Sandro Santilli
30186ac8cb Pretend _CDB_UserQuotaInBytes has to stay in public
Fixes run of the testsuite in the pre-extension model
2014-05-08 17:20:40 +02:00
Sandro Santilli
acf3097c3a Add CDB_SetUserQuotaInBytes function
Closes #2
2014-05-08 17:14:06 +02:00
Sandro Santilli
055efe04aa Do not assume existance of a "publicuser" role in CDB_UserTables
Closes #5 (take 2)
2014-05-08 16:42:38 +02:00
Sandro Santilli
1c753b24e5 Do not assume existance of a "publicuser" role
Closes #5
2014-05-08 16:32:26 +02:00