Club come entità principale, branding e fix infrastruttura streaming.
Introduce clubs con abbonamento, branding Active Storage e flusso registrazione società; corregge healthcheck MediaMTX (immagine distroless) e allinea dominio produzione matchlivetv.it. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
66
backend/db/schema.rb
generated
66
backend/db/schema.rb
generated
@@ -10,11 +10,39 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2026_05_27_140000) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2026_05_27_160101) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
t.uuid "record_id", null: false
|
||||
t.uuid "blob_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
||||
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.string "key", null: false
|
||||
t.string "filename", null: false
|
||||
t.string "content_type"
|
||||
t.text "metadata"
|
||||
t.string "service_name", null: false
|
||||
t.bigint "byte_size", null: false
|
||||
t.string "checksum"
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.uuid "blob_id", null: false
|
||||
t.string "variation_digest", null: false
|
||||
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "admin_accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.string "username", null: false
|
||||
t.string "password_digest", null: false
|
||||
@@ -23,6 +51,27 @@ ActiveRecord::Schema[7.2].define(version: 2026_05_27_140000) do
|
||||
t.index ["username"], name: "index_admin_accounts_on_username", unique: true
|
||||
end
|
||||
|
||||
create_table "club_memberships", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.uuid "user_id", null: false
|
||||
t.uuid "club_id", null: false
|
||||
t.string "role", default: "owner", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["club_id"], name: "index_club_memberships_on_club_id"
|
||||
t.index ["user_id", "club_id"], name: "index_club_memberships_on_user_id_and_club_id", unique: true
|
||||
t.index ["user_id"], name: "index_club_memberships_on_user_id"
|
||||
end
|
||||
|
||||
create_table "clubs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "sport", default: "volleyball", null: false
|
||||
t.string "logo_url"
|
||||
t.string "primary_color", default: "#e53935", null: false
|
||||
t.string "secondary_color", default: "#ffffff", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "device_states", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.uuid "stream_session_id", null: false
|
||||
t.string "device_role", null: false
|
||||
@@ -133,7 +182,6 @@ ActiveRecord::Schema[7.2].define(version: 2026_05_27_140000) do
|
||||
end
|
||||
|
||||
create_table "subscriptions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.uuid "team_id", null: false
|
||||
t.uuid "plan_id", null: false
|
||||
t.string "status", default: "active", null: false
|
||||
t.string "stripe_customer_id"
|
||||
@@ -143,9 +191,10 @@ ActiveRecord::Schema[7.2].define(version: 2026_05_27_140000) do
|
||||
t.boolean "cancel_at_period_end", default: false, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.uuid "club_id", null: false
|
||||
t.index ["club_id"], name: "index_subscriptions_on_club_id", unique: true
|
||||
t.index ["plan_id"], name: "index_subscriptions_on_plan_id"
|
||||
t.index ["stripe_subscription_id"], name: "index_subscriptions_on_stripe_subscription_id", unique: true, where: "(stripe_subscription_id IS NOT NULL)"
|
||||
t.index ["team_id"], name: "index_subscriptions_on_team_id", unique: true
|
||||
end
|
||||
|
||||
create_table "team_invitations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
@@ -170,6 +219,10 @@ ActiveRecord::Schema[7.2].define(version: 2026_05_27_140000) do
|
||||
t.string "logo_url"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.uuid "club_id", null: false
|
||||
t.string "primary_color"
|
||||
t.string "secondary_color"
|
||||
t.index ["club_id"], name: "index_teams_on_club_id"
|
||||
end
|
||||
|
||||
create_table "user_teams", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
@@ -210,6 +263,10 @@ ActiveRecord::Schema[7.2].define(version: 2026_05_27_140000) do
|
||||
t.index ["team_id"], name: "index_youtube_credentials_on_team_id"
|
||||
end
|
||||
|
||||
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "club_memberships", "clubs"
|
||||
add_foreign_key "club_memberships", "users"
|
||||
add_foreign_key "device_states", "stream_sessions"
|
||||
add_foreign_key "matches", "teams"
|
||||
add_foreign_key "recordings", "stream_sessions"
|
||||
@@ -218,9 +275,10 @@ ActiveRecord::Schema[7.2].define(version: 2026_05_27_140000) do
|
||||
add_foreign_key "stream_events", "stream_sessions"
|
||||
add_foreign_key "stream_sessions", "matches"
|
||||
add_foreign_key "stream_sessions", "users"
|
||||
add_foreign_key "subscriptions", "clubs"
|
||||
add_foreign_key "subscriptions", "plans"
|
||||
add_foreign_key "subscriptions", "teams"
|
||||
add_foreign_key "team_invitations", "teams"
|
||||
add_foreign_key "teams", "clubs"
|
||||
add_foreign_key "user_teams", "teams"
|
||||
add_foreign_key "user_teams", "users"
|
||||
add_foreign_key "youtube_credentials", "teams"
|
||||
|
||||
Reference in New Issue
Block a user