Skip to content

Commit 73f76a6

Browse files
committed
Add space_id to sources
1 parent af18e2e commit 73f76a6

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddSpaceIdToSources < ActiveRecord::Migration[7.2]
2+
def change
3+
add_reference :sources, :space, foreign_key: true
4+
end
5+
end

db/schema.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.2].define(version: 2025_03_25_151745) do
13+
ActiveRecord::Schema[7.2].define(version: 2025_08_07_085314) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "plpgsql"
1616

@@ -480,7 +480,9 @@
480480
t.integer "approval_status"
481481
t.datetime "updated_at"
482482
t.string "default_language"
483+
t.bigint "space_id"
483484
t.index ["content_provider_id"], name: "index_sources_on_content_provider_id"
485+
t.index ["space_id"], name: "index_sources_on_space_id"
484486
t.index ["user_id"], name: "index_sources_on_user_id"
485487
end
486488

@@ -665,6 +667,7 @@
665667
add_foreign_key "node_links", "nodes"
666668
add_foreign_key "nodes", "users"
667669
add_foreign_key "sources", "content_providers"
670+
add_foreign_key "sources", "spaces"
668671
add_foreign_key "sources", "users"
669672
add_foreign_key "space_roles", "spaces"
670673
add_foreign_key "space_roles", "users"

0 commit comments

Comments
 (0)