Skip to content

Commit 6c1ef4b

Browse files
authored
Merge pull request #49 from TaskarCenterAtUW/2510-team-exclusion-from-workspace-schema
prevent Team + TeamUser objs + sql from cascading to workplace schemas
2 parents 0612a27 + cc166a8 commit 6c1ef4b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

app/controllers/api/workspaces_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def create
2828
# tables references from the "public" schema instead:
2929
#
3030
connection = ActiveRecord::Base.connection
31+
connection.execute("DROP TABLE \"#{workspace_schema}\".team_user CASCADE")
32+
connection.execute("DROP TABLE \"#{workspace_schema}\".teams CASCADE")
3133
connection.execute("DROP TABLE \"#{workspace_schema}\".users CASCADE")
3234
end
3335

config/initializers/apartment.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
"Message",
3333
"Oauth2Application",
3434
"Report",
35+
"Team",
36+
"TeamUser",
3537
"User",
3638
"UserBlock",
3739
"UserMute",

0 commit comments

Comments
 (0)