Everytime I run rake db:migrate
on my project the db/structure.sql
changes and I'm happy. Unfortunately the changes are not only additions to my table but also something strage in explicitly using our tenant
keyword and extensions
keyword.
db/structure.sql | 20278 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------
1 file changed, 9565 insertions(+), 10713 deletions(-)
This is part of my interesting diff after I migrate:
-CREATE FUNCTION _final_median_function(anyarray) RETURNS double precision
+CREATE FUNCTION extensions._final_median_function(anyarray) RETURNS double precision
and here is an example for table:
-SET search_path = at, pg_catalog;
-CREATE TABLE advert_all_clicks (
+CREATE TABLE at.advert_all_clicks (
Postgres 9.6.10 (also tested and it happens in 10.+) Multitenancy is done using apartment
Does anyone has any idea why this is happening? Could't find too much and I'm battling with this for a while.
Edit: In connection to my problem I found this but it applies to postgres < 9.3