Skip to content

Commit 1c1acd8

Browse files
authored
Merge pull request #56 from TaskarCenterAtUW/feature-run-postgis
Update apartment.rb
2 parents 8b273b5 + a99be98 commit 1c1acd8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

config/initializers/apartment.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@
7272
# end
7373
# end
7474
#
75+
# Executed after the creation of a new Tenant. This is useful for creating extensions or running setup specific to a Tenant.
76+
config.before_create = lambda do |tenant_name|
77+
ActiveRecord::Base.connection.execute(<<-SQL)
78+
SELECT deploy_postgis();
79+
SQL
80+
end
81+
7582
config.tenant_names = lambda do
7683
ActiveRecord::Base.connection
7784
.execute("SELECT schema_name FROM information_schema.schemata WHERE schema_name LIKE 'workspace-%';")

0 commit comments

Comments
 (0)