Compact the UUIDs to base36

This commit is contained in:
Kevin McConnell
2025-11-12 11:08:24 +00:00
committed by Mike Dalessio
parent e4011ef211
commit 6c04b56f4b
7 changed files with 262 additions and 239 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ module Board::Accessible
end end
def grant_to(users) def grant_to(users)
Access.insert_all Array(users).collect { |user| { id: SecureRandom.uuid_v7, board_id: proxy_association.owner.id, user_id: user.id } } Access.insert_all Array(users).collect { |user| { id: UuidPrimaryKey.generate, board_id: proxy_association.owner.id, user_id: user.id } }
end end
def revoke_from(users) def revoke_from(users)
+11 -1
View File
@@ -5,10 +5,20 @@ module UuidPrimaryKey
before_create :generate_uuid_primary_key before_create :generate_uuid_primary_key
end end
def self.generate
# Base 36 UUIDs are a bit more compact; a bit less ugly
uuid_to_base36(SecureRandom.uuid_v7)
end
def self.uuid_to_base36(uuid)
# Convert standard UUID format to base36 (lowercase), padded to 25 chars
uuid.delete('-').to_i(16).to_s(36).rjust(25, '0')
end
private private
def generate_uuid_primary_key def generate_uuid_primary_key
return if id.present? return if id.present?
self.id = SecureRandom.uuid_v7 self.id = UuidPrimaryKey.generate
end end
end end
+1 -1
View File
@@ -12,6 +12,6 @@ module User::Accessor
private private
def grant_access_to_boards def grant_access_to_boards
Access.insert_all account.boards.all_access.pluck(:id).collect { |board_id| { id: SecureRandom.uuid_v7, board_id: board_id, user_id: id } } Access.insert_all account.boards.all_access.pluck(:id).collect { |board_id| { id: UuidPrimaryKey.generate, board_id: board_id, user_id: id } }
end end
end end
+116 -116
View File
@@ -1,20 +1,20 @@
class InitialSchema < ActiveRecord::Migration[8.2] class InitialSchema < ActiveRecord::Migration[8.2]
def change def change
create_table "accesses", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "accesses", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.datetime "accessed_at" t.datetime "accessed_at"
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "involvement", default: "access_only", null: false t.string "involvement", default: "access_only", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["accessed_at"], name: "index_accesses_on_accessed_at", order: :desc t.index ["accessed_at"], name: "index_accesses_on_accessed_at", order: :desc
t.index ["board_id", "user_id"], name: "index_accesses_on_board_id_and_user_id", unique: true t.index ["board_id", "user_id"], name: "index_accesses_on_board_id_and_user_id", unique: true
t.index ["board_id"], name: "index_accesses_on_board_id" t.index ["board_id"], name: "index_accesses_on_board_id"
t.index ["user_id"], name: "index_accesses_on_user_id" t.index ["user_id"], name: "index_accesses_on_user_id"
end end
create_table "account_join_codes", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "account_join_codes", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "code", null: false t.string "code", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -23,7 +23,7 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["code"], name: "index_account_join_codes_on_code", unique: true t.index ["code"], name: "index_account_join_codes_on_code", unique: true
end end
create_table "accounts", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "accounts", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.integer "external_account_id" t.integer "external_account_id"
t.string "name", null: false t.string "name", null: false
@@ -31,27 +31,27 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["external_account_id"], name: "index_accounts_on_external_account_id", unique: true t.index ["external_account_id"], name: "index_accounts_on_external_account_id", unique: true
end end
create_table "action_text_rich_texts", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "action_text_rich_texts", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.text "body", size: :long t.text "body", size: :long
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name", null: false t.string "name", null: false
t.string "record_id", limit: 36, null: false t.string "record_id", limit: 25, null: false
t.string "record_type", null: false t.string "record_type", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
end end
create_table "active_storage_attachments", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "active_storage_attachments", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "blob_id", limit: 36, null: false t.string "blob_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name", null: false t.string "name", null: false
t.string "record_id", limit: 36, null: false t.string "record_id", limit: 25, null: false
t.string "record_type", null: false t.string "record_type", null: false
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" 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 t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
end end
create_table "active_storage_blobs", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "active_storage_blobs", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.bigint "byte_size", null: false t.bigint "byte_size", null: false
t.string "checksum" t.string "checksum"
t.string "content_type" t.string "content_type"
@@ -63,38 +63,38 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
end end
create_table "active_storage_variant_records", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "active_storage_variant_records", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "blob_id", limit: 36, null: false t.string "blob_id", limit: 25, null: false
t.string "variation_digest", null: false t.string "variation_digest", null: false
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
end end
create_table "assignees_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "assignees_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "assignee_id", limit: 36, null: false t.string "assignee_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["assignee_id"], name: "index_assignees_filters_on_assignee_id" t.index ["assignee_id"], name: "index_assignees_filters_on_assignee_id"
t.index ["filter_id"], name: "index_assignees_filters_on_filter_id" t.index ["filter_id"], name: "index_assignees_filters_on_filter_id"
end end
create_table "assigners_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "assigners_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "assigner_id", limit: 36, null: false t.string "assigner_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["assigner_id"], name: "index_assigners_filters_on_assigner_id" t.index ["assigner_id"], name: "index_assigners_filters_on_assigner_id"
t.index ["filter_id"], name: "index_assigners_filters_on_filter_id" t.index ["filter_id"], name: "index_assigners_filters_on_filter_id"
end end
create_table "assignments", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "assignments", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "assignee_id", limit: 36, null: false t.string "assignee_id", limit: 25, null: false
t.string "assigner_id", limit: 36, null: false t.string "assigner_id", limit: 25, null: false
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["assignee_id", "card_id"], name: "index_assignments_on_assignee_id_and_card_id", unique: true t.index ["assignee_id", "card_id"], name: "index_assignments_on_assignee_id_and_card_id", unique: true
t.index ["card_id"], name: "index_assignments_on_card_id" t.index ["card_id"], name: "index_assignments_on_card_id"
end end
create_table "board_publications", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "board_publications", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "key" t.string "key"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -102,32 +102,32 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["key"], name: "index_board_publications_on_key", unique: true t.index ["key"], name: "index_board_publications_on_key", unique: true
end end
create_table "boards", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "boards", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.boolean "all_access", default: false, null: false t.boolean "all_access", default: false, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.string "name", null: false t.string "name", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["creator_id"], name: "index_boards_on_creator_id" t.index ["creator_id"], name: "index_boards_on_creator_id"
end end
create_table "boards_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "boards_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["board_id"], name: "index_boards_filters_on_board_id" t.index ["board_id"], name: "index_boards_filters_on_board_id"
t.index ["filter_id"], name: "index_boards_filters_on_filter_id" t.index ["filter_id"], name: "index_boards_filters_on_filter_id"
end end
create_table "card_activity_spikes", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "card_activity_spikes", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id"], name: "index_card_activity_spikes_on_card_id" t.index ["card_id"], name: "index_card_activity_spikes_on_card_id"
end end
create_table "card_engagements", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "card_engagements", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36 t.string "card_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "status", default: "doing", null: false t.string "status", default: "doing", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -135,28 +135,28 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["status"], name: "index_card_engagements_on_status" t.index ["status"], name: "index_card_engagements_on_status"
end end
create_table "card_goldnesses", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "card_goldnesses", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id"], name: "index_card_goldnesses_on_card_id", unique: true t.index ["card_id"], name: "index_card_goldnesses_on_card_id", unique: true
end end
create_table "card_not_nows", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "card_not_nows", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36 t.string "user_id", limit: 25
t.index ["card_id"], name: "index_card_not_nows_on_card_id", unique: true t.index ["card_id"], name: "index_card_not_nows_on_card_id", unique: true
t.index ["user_id"], name: "index_card_not_nows_on_user_id" t.index ["user_id"], name: "index_card_not_nows_on_user_id"
end end
create_table "cards", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "cards", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.string "column_id", limit: 36 t.string "column_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.date "due_on" t.date "due_on"
t.datetime "last_active_at", null: false t.datetime "last_active_at", null: false
t.string "status", default: "drafted", null: false t.string "status", default: "drafted", null: false
@@ -168,25 +168,25 @@ class InitialSchema < ActiveRecord::Migration[8.2]
end end
create_table "closers_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "closers_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "closer_id", limit: 36, null: false t.string "closer_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["closer_id"], name: "index_closers_filters_on_closer_id" t.index ["closer_id"], name: "index_closers_filters_on_closer_id"
t.index ["filter_id"], name: "index_closers_filters_on_filter_id" t.index ["filter_id"], name: "index_closers_filters_on_filter_id"
end end
create_table "closures", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "closures", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36 t.string "user_id", limit: 25
t.index ["card_id", "created_at"], name: "index_closures_on_card_id_and_created_at" t.index ["card_id", "created_at"], name: "index_closures_on_card_id_and_created_at"
t.index ["card_id"], name: "index_closures_on_card_id", unique: true t.index ["card_id"], name: "index_closures_on_card_id", unique: true
t.index ["user_id"], name: "index_closures_on_user_id" t.index ["user_id"], name: "index_closures_on_user_id"
end end
create_table "columns", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "columns", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.string "color", null: false t.string "color", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name", null: false t.string "name", null: false
@@ -196,25 +196,25 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["board_id"], name: "index_columns_on_board_id" t.index ["board_id"], name: "index_columns_on_board_id"
end end
create_table "comments", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "comments", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id"], name: "index_comments_on_card_id" t.index ["card_id"], name: "index_comments_on_card_id"
end end
create_table "creators_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "creators_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["creator_id"], name: "index_creators_filters_on_creator_id" t.index ["creator_id"], name: "index_creators_filters_on_creator_id"
t.index ["filter_id"], name: "index_creators_filters_on_filter_id" t.index ["filter_id"], name: "index_creators_filters_on_filter_id"
end end
create_table "entropies", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "entropies", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.bigint "auto_postpone_period", default: 2592000, null: false t.bigint "auto_postpone_period", default: 2592000, null: false
t.string "container_id", limit: 36, null: false t.string "container_id", limit: 25, null: false
t.string "container_type", null: false t.string "container_type", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -222,13 +222,13 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["container_type", "container_id"], name: "index_entropy_configurations_on_container", unique: true t.index ["container_type", "container_id"], name: "index_entropy_configurations_on_container", unique: true
end end
create_table "events", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "events", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "action", null: false t.string "action", null: false
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.string "eventable_id", limit: 36, null: false t.string "eventable_id", limit: 25, null: false
t.string "eventable_type", null: false t.string "eventable_type", null: false
t.json "particulars", default: -> { "(json_object())" } t.json "particulars", default: -> { "(json_object())" }
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -239,10 +239,10 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["eventable_type", "eventable_id"], name: "index_events_on_eventable" t.index ["eventable_type", "eventable_id"], name: "index_events_on_eventable"
end end
create_table "filters", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "filters", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.json "fields", default: -> { "(json_object())" }, null: false t.json "fields", default: -> { "(json_object())" }, null: false
t.string "params_digest", null: false t.string "params_digest", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -250,8 +250,8 @@ class InitialSchema < ActiveRecord::Migration[8.2]
end end
create_table "filters_tags", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "filters_tags", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.string "tag_id", limit: 36, null: false t.string "tag_id", limit: 25, null: false
t.index ["filter_id"], name: "index_filters_tags_on_filter_id" t.index ["filter_id"], name: "index_filters_tags_on_filter_id"
t.index ["tag_id"], name: "index_filters_tags_on_tag_id" t.index ["tag_id"], name: "index_filters_tags_on_tag_id"
end end
@@ -285,11 +285,11 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["tenant"], name: "index_memberships_on_user_tenant_and_user_id" t.index ["tenant"], name: "index_memberships_on_user_tenant_and_user_id"
end end
create_table "mentions", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "mentions", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "mentionee_id", limit: 36, null: false t.string "mentionee_id", limit: 25, null: false
t.string "mentioner_id", limit: 36, null: false t.string "mentioner_id", limit: 25, null: false
t.string "source_id", limit: 36, null: false t.string "source_id", limit: 25, null: false
t.string "source_type", null: false t.string "source_type", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["mentionee_id"], name: "index_mentions_on_mentionee_id" t.index ["mentionee_id"], name: "index_mentions_on_mentionee_id"
@@ -297,53 +297,53 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["source_type", "source_id"], name: "index_mentions_on_source" t.index ["source_type", "source_id"], name: "index_mentions_on_source"
end end
create_table "notification_bundles", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "notification_bundles", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "ends_at", null: false t.datetime "ends_at", null: false
t.datetime "starts_at", null: false t.datetime "starts_at", null: false
t.integer "status", default: 0, null: false t.integer "status", default: 0, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["ends_at", "status"], name: "index_notification_bundles_on_ends_at_and_status" t.index ["ends_at", "status"], name: "index_notification_bundles_on_ends_at_and_status"
t.index ["user_id", "starts_at", "ends_at"], name: "idx_on_user_id_starts_at_ends_at_7eae5d3ac5" t.index ["user_id", "starts_at", "ends_at"], name: "idx_on_user_id_starts_at_ends_at_7eae5d3ac5"
t.index ["user_id", "status"], name: "index_notification_bundles_on_user_id_and_status" t.index ["user_id", "status"], name: "index_notification_bundles_on_user_id_and_status"
end end
create_table "notifications", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "notifications", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36 t.string "creator_id", limit: 25
t.datetime "read_at" t.datetime "read_at"
t.string "source_id", limit: 36, null: false t.string "source_id", limit: 25, null: false
t.string "source_type", null: false t.string "source_type", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["creator_id"], name: "index_notifications_on_creator_id" t.index ["creator_id"], name: "index_notifications_on_creator_id"
t.index ["source_type", "source_id"], name: "index_notifications_on_source" t.index ["source_type", "source_id"], name: "index_notifications_on_source"
t.index ["user_id", "read_at", "created_at"], name: "index_notifications_on_user_id_and_read_at_and_created_at", order: { read_at: :desc, created_at: :desc } t.index ["user_id", "read_at", "created_at"], name: "index_notifications_on_user_id_and_read_at_and_created_at", order: { read_at: :desc, created_at: :desc }
t.index ["user_id"], name: "index_notifications_on_user_id" t.index ["user_id"], name: "index_notifications_on_user_id"
end end
create_table "pins", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "pins", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["card_id", "user_id"], name: "index_pins_on_card_id_and_user_id", unique: true t.index ["card_id", "user_id"], name: "index_pins_on_card_id_and_user_id", unique: true
t.index ["card_id"], name: "index_pins_on_card_id" t.index ["card_id"], name: "index_pins_on_card_id"
t.index ["user_id"], name: "index_pins_on_user_id" t.index ["user_id"], name: "index_pins_on_user_id"
end end
create_table "push_subscriptions", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "push_subscriptions", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "auth_key" t.string "auth_key"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "endpoint" t.string "endpoint"
t.string "p256dh_key" t.string "p256dh_key"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_agent" t.string "user_agent"
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["endpoint", "p256dh_key", "auth_key"], name: "idx_on_endpoint_p256dh_key_auth_key_7553014576" t.index ["endpoint", "p256dh_key", "auth_key"], name: "idx_on_endpoint_p256dh_key_auth_key_7553014576"
t.index ["endpoint"], name: "index_push_subscriptions_on_endpoint" t.index ["endpoint"], name: "index_push_subscriptions_on_endpoint"
t.index ["user_agent"], name: "index_push_subscriptions_on_user_agent" t.index ["user_agent"], name: "index_push_subscriptions_on_user_agent"
@@ -351,27 +351,27 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["user_id"], name: "index_push_subscriptions_on_user_id" t.index ["user_id"], name: "index_push_subscriptions_on_user_id"
end end
create_table "reactions", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "reactions", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "comment_id", limit: 36, null: false t.string "comment_id", limit: 25, null: false
t.string "content", limit: 16, null: false t.string "content", limit: 16, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "reacter_id", limit: 36, null: false t.string "reacter_id", limit: 25, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["comment_id"], name: "index_reactions_on_comment_id" t.index ["comment_id"], name: "index_reactions_on_comment_id"
t.index ["reacter_id"], name: "index_reactions_on_reacter_id" t.index ["reacter_id"], name: "index_reactions_on_reacter_id"
end end
create_table "search_queries", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "search_queries", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "terms", limit: 2000, null: false t.string "terms", limit: 2000, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["user_id", "terms"], name: "index_search_queries_on_user_id_and_terms", length: { terms: 255 } t.index ["user_id", "terms"], name: "index_search_queries_on_user_id_and_terms", length: { terms: 255 }
t.index ["user_id", "updated_at"], name: "index_search_queries_on_user_id_and_updated_at", unique: true t.index ["user_id", "updated_at"], name: "index_search_queries_on_user_id_and_updated_at", unique: true
t.index ["user_id"], name: "index_search_queries_on_user_id" t.index ["user_id"], name: "index_search_queries_on_user_id"
end end
create_table "search_results", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "search_results", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
end end
@@ -385,9 +385,9 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["identity_id"], name: "index_sessions_on_identity_id" t.index ["identity_id"], name: "index_sessions_on_identity_id"
end end
create_table "steps", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "steps", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.boolean "completed", default: false, null: false t.boolean "completed", default: false, null: false
t.text "content", null: false t.text "content", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
@@ -396,35 +396,35 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["card_id"], name: "index_steps_on_card_id" t.index ["card_id"], name: "index_steps_on_card_id"
end end
create_table "taggings", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "taggings", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "tag_id", limit: 36, null: false t.string "tag_id", limit: 25, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id", "tag_id"], name: "index_taggings_on_card_id_and_tag_id", unique: true t.index ["card_id", "tag_id"], name: "index_taggings_on_card_id_and_tag_id", unique: true
t.index ["tag_id"], name: "index_taggings_on_tag_id" t.index ["tag_id"], name: "index_taggings_on_tag_id"
end end
create_table "tags", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "tags", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "title" t.string "title"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["title"], name: "index_tags_on_title", unique: true t.index ["title"], name: "index_tags_on_title", unique: true
end end
create_table "user_settings", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "user_settings", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.integer "bundle_email_frequency", default: 0, null: false t.integer "bundle_email_frequency", default: 0, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "timezone_name" t.string "timezone_name"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["user_id", "bundle_email_frequency"], name: "index_user_settings_on_user_id_and_bundle_email_frequency" t.index ["user_id", "bundle_email_frequency"], name: "index_user_settings_on_user_id_and_bundle_email_frequency"
t.index ["user_id"], name: "index_user_settings_on_user_id" t.index ["user_id"], name: "index_user_settings_on_user_id"
end end
create_table "users", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "users", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.boolean "active", default: true, null: false t.boolean "active", default: true, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.integer "membership_id" t.integer "membership_id"
@@ -435,42 +435,42 @@ class InitialSchema < ActiveRecord::Migration[8.2]
t.index ["role"], name: "index_users_on_role" t.index ["role"], name: "index_users_on_role"
end end
create_table "watches", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "watches", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.boolean "watching", default: true, null: false t.boolean "watching", default: true, null: false
t.index ["card_id"], name: "index_watches_on_card_id" t.index ["card_id"], name: "index_watches_on_card_id"
t.index ["user_id", "card_id"], name: "index_watches_on_user_id_and_card_id" t.index ["user_id", "card_id"], name: "index_watches_on_user_id_and_card_id"
t.index ["user_id"], name: "index_watches_on_user_id" t.index ["user_id"], name: "index_watches_on_user_id"
end end
create_table "webhook_delinquency_trackers", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "webhook_delinquency_trackers", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.integer "consecutive_failures_count", default: 0 t.integer "consecutive_failures_count", default: 0
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "first_failure_at" t.datetime "first_failure_at"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "webhook_id", limit: 36, null: false t.string "webhook_id", limit: 25, null: false
t.index ["webhook_id"], name: "index_webhook_delinquency_trackers_on_webhook_id" t.index ["webhook_id"], name: "index_webhook_delinquency_trackers_on_webhook_id"
end end
create_table "webhook_deliveries", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "webhook_deliveries", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "event_id", limit: 36, null: false t.string "event_id", limit: 25, null: false
t.text "request" t.text "request"
t.text "response" t.text "response"
t.string "state", null: false t.string "state", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "webhook_id", limit: 36, null: false t.string "webhook_id", limit: 25, null: false
t.index ["event_id"], name: "index_webhook_deliveries_on_event_id" t.index ["event_id"], name: "index_webhook_deliveries_on_event_id"
t.index ["webhook_id"], name: "index_webhook_deliveries_on_webhook_id" t.index ["webhook_id"], name: "index_webhook_deliveries_on_webhook_id"
end end
create_table "webhooks", id: :string, limit: 36, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t| create_table "webhooks", id: :string, limit: 25, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci" do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.boolean "active", default: true, null: false t.boolean "active", default: true, null: false
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name" t.string "name"
t.string "signing_secret", null: false t.string "signing_secret", null: false
Generated
+127 -115
View File
@@ -11,21 +11,21 @@
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
create_table "accesses", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "accesses", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.datetime "accessed_at" t.datetime "accessed_at"
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "involvement", default: "access_only", null: false t.string "involvement", default: "access_only", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["accessed_at"], name: "index_accesses_on_accessed_at", order: :desc t.index ["accessed_at"], name: "index_accesses_on_accessed_at", order: :desc
t.index ["board_id", "user_id"], name: "index_accesses_on_board_id_and_user_id", unique: true t.index ["board_id", "user_id"], name: "index_accesses_on_board_id_and_user_id", unique: true
t.index ["board_id"], name: "index_accesses_on_board_id" t.index ["board_id"], name: "index_accesses_on_board_id"
t.index ["user_id"], name: "index_accesses_on_user_id" t.index ["user_id"], name: "index_accesses_on_user_id"
end end
create_table "account_join_codes", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "account_join_codes", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "code", null: false t.string "code", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -34,7 +34,7 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["code"], name: "index_account_join_codes_on_code", unique: true t.index ["code"], name: "index_account_join_codes_on_code", unique: true
end end
create_table "accounts", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "accounts", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.bigint "cards_count", default: 0, null: false t.bigint "cards_count", default: 0, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.integer "external_account_id" t.integer "external_account_id"
@@ -43,27 +43,27 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["external_account_id"], name: "index_accounts_on_external_account_id", unique: true t.index ["external_account_id"], name: "index_accounts_on_external_account_id", unique: true
end end
create_table "action_text_rich_texts", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "action_text_rich_texts", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.text "body", size: :long t.text "body", size: :long
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name", null: false t.string "name", null: false
t.string "record_id", limit: 36, null: false t.string "record_id", limit: 25, null: false
t.string "record_type", null: false t.string "record_type", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
end end
create_table "active_storage_attachments", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "active_storage_attachments", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "blob_id", limit: 36, null: false t.string "blob_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name", null: false t.string "name", null: false
t.string "record_id", limit: 36, null: false t.string "record_id", limit: 25, null: false
t.string "record_type", null: false t.string "record_type", null: false
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" 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 t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
end end
create_table "active_storage_blobs", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "active_storage_blobs", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.bigint "byte_size", null: false t.bigint "byte_size", null: false
t.string "checksum" t.string "checksum"
t.string "content_type" t.string "content_type"
@@ -75,38 +75,38 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
end end
create_table "active_storage_variant_records", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "active_storage_variant_records", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "blob_id", limit: 36, null: false t.string "blob_id", limit: 25, null: false
t.string "variation_digest", null: false t.string "variation_digest", null: false
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
end end
create_table "assignees_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "assignees_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "assignee_id", limit: 36, null: false t.string "assignee_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["assignee_id"], name: "index_assignees_filters_on_assignee_id" t.index ["assignee_id"], name: "index_assignees_filters_on_assignee_id"
t.index ["filter_id"], name: "index_assignees_filters_on_filter_id" t.index ["filter_id"], name: "index_assignees_filters_on_filter_id"
end end
create_table "assigners_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "assigners_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "assigner_id", limit: 36, null: false t.string "assigner_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["assigner_id"], name: "index_assigners_filters_on_assigner_id" t.index ["assigner_id"], name: "index_assigners_filters_on_assigner_id"
t.index ["filter_id"], name: "index_assigners_filters_on_filter_id" t.index ["filter_id"], name: "index_assigners_filters_on_filter_id"
end end
create_table "assignments", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "assignments", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "assignee_id", limit: 36, null: false t.string "assignee_id", limit: 25, null: false
t.string "assigner_id", limit: 36, null: false t.string "assigner_id", limit: 25, null: false
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["assignee_id", "card_id"], name: "index_assignments_on_assignee_id_and_card_id", unique: true t.index ["assignee_id", "card_id"], name: "index_assignments_on_assignee_id_and_card_id", unique: true
t.index ["card_id"], name: "index_assignments_on_card_id" t.index ["card_id"], name: "index_assignments_on_card_id"
end end
create_table "board_publications", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "board_publications", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "key" t.string "key"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -114,32 +114,32 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["key"], name: "index_board_publications_on_key", unique: true t.index ["key"], name: "index_board_publications_on_key", unique: true
end end
create_table "boards", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "boards", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.boolean "all_access", default: false, null: false t.boolean "all_access", default: false, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.string "name", null: false t.string "name", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["creator_id"], name: "index_boards_on_creator_id" t.index ["creator_id"], name: "index_boards_on_creator_id"
end end
create_table "boards_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "boards_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["board_id"], name: "index_boards_filters_on_board_id" t.index ["board_id"], name: "index_boards_filters_on_board_id"
t.index ["filter_id"], name: "index_boards_filters_on_filter_id" t.index ["filter_id"], name: "index_boards_filters_on_filter_id"
end end
create_table "card_activity_spikes", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "card_activity_spikes", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id"], name: "index_card_activity_spikes_on_card_id" t.index ["card_id"], name: "index_card_activity_spikes_on_card_id"
end end
create_table "card_engagements", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "card_engagements", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36 t.string "card_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "status", default: "doing", null: false t.string "status", default: "doing", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -147,28 +147,28 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["status"], name: "index_card_engagements_on_status" t.index ["status"], name: "index_card_engagements_on_status"
end end
create_table "card_goldnesses", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "card_goldnesses", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id"], name: "index_card_goldnesses_on_card_id", unique: true t.index ["card_id"], name: "index_card_goldnesses_on_card_id", unique: true
end end
create_table "card_not_nows", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "card_not_nows", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36 t.string "user_id", limit: 25
t.index ["card_id"], name: "index_card_not_nows_on_card_id", unique: true t.index ["card_id"], name: "index_card_not_nows_on_card_id", unique: true
t.index ["user_id"], name: "index_card_not_nows_on_user_id" t.index ["user_id"], name: "index_card_not_nows_on_user_id"
end end
create_table "cards", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "cards", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.string "column_id", limit: 36 t.string "column_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.date "due_on" t.date "due_on"
t.datetime "last_active_at", null: false t.datetime "last_active_at", null: false
t.bigint "number", null: false t.bigint "number", null: false
@@ -182,25 +182,25 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
end end
create_table "closers_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "closers_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "closer_id", limit: 36, null: false t.string "closer_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["closer_id"], name: "index_closers_filters_on_closer_id" t.index ["closer_id"], name: "index_closers_filters_on_closer_id"
t.index ["filter_id"], name: "index_closers_filters_on_filter_id" t.index ["filter_id"], name: "index_closers_filters_on_filter_id"
end end
create_table "closures", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "closures", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36 t.string "user_id", limit: 25
t.index ["card_id", "created_at"], name: "index_closures_on_card_id_and_created_at" t.index ["card_id", "created_at"], name: "index_closures_on_card_id_and_created_at"
t.index ["card_id"], name: "index_closures_on_card_id", unique: true t.index ["card_id"], name: "index_closures_on_card_id", unique: true
t.index ["user_id"], name: "index_closures_on_user_id" t.index ["user_id"], name: "index_closures_on_user_id"
end end
create_table "columns", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "columns", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.string "color", null: false t.string "color", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name", null: false t.string "name", null: false
@@ -210,25 +210,25 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["board_id"], name: "index_columns_on_board_id" t.index ["board_id"], name: "index_columns_on_board_id"
end end
create_table "comments", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "comments", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id"], name: "index_comments_on_card_id" t.index ["card_id"], name: "index_comments_on_card_id"
end end
create_table "creators_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "creators_filters", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.index ["creator_id"], name: "index_creators_filters_on_creator_id" t.index ["creator_id"], name: "index_creators_filters_on_creator_id"
t.index ["filter_id"], name: "index_creators_filters_on_filter_id" t.index ["filter_id"], name: "index_creators_filters_on_filter_id"
end end
create_table "entropies", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "entropies", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.bigint "auto_postpone_period", default: 2592000, null: false t.bigint "auto_postpone_period", default: 2592000, null: false
t.string "container_id", limit: 36, null: false t.string "container_id", limit: 25, null: false
t.string "container_type", null: false t.string "container_type", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -236,13 +236,13 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["container_type", "container_id"], name: "index_entropy_configurations_on_container", unique: true t.index ["container_type", "container_id"], name: "index_entropy_configurations_on_container", unique: true
end end
create_table "events", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "events", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "action", null: false t.string "action", null: false
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.string "eventable_id", limit: 36, null: false t.string "eventable_id", limit: 25, null: false
t.string "eventable_type", null: false t.string "eventable_type", null: false
t.json "particulars", default: -> { "(json_object())" } t.json "particulars", default: -> { "(json_object())" }
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -253,10 +253,10 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["eventable_type", "eventable_id"], name: "index_events_on_eventable" t.index ["eventable_type", "eventable_id"], name: "index_events_on_eventable"
end end
create_table "filters", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "filters", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36, null: false t.string "creator_id", limit: 25, null: false
t.json "fields", default: -> { "(json_object())" }, null: false t.json "fields", default: -> { "(json_object())" }, null: false
t.string "params_digest", null: false t.string "params_digest", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
@@ -264,8 +264,8 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
end end
create_table "filters_tags", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "filters_tags", id: false, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "filter_id", limit: 36, null: false t.string "filter_id", limit: 25, null: false
t.string "tag_id", limit: 36, null: false t.string "tag_id", limit: 25, null: false
t.index ["filter_id"], name: "index_filters_tags_on_filter_id" t.index ["filter_id"], name: "index_filters_tags_on_filter_id"
t.index ["tag_id"], name: "index_filters_tags_on_tag_id" t.index ["tag_id"], name: "index_filters_tags_on_tag_id"
end end
@@ -298,11 +298,11 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["tenant"], name: "index_memberships_on_user_tenant_and_user_id" t.index ["tenant"], name: "index_memberships_on_user_tenant_and_user_id"
end end
create_table "mentions", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "mentions", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "mentionee_id", limit: 36, null: false t.string "mentionee_id", limit: 25, null: false
t.string "mentioner_id", limit: 36, null: false t.string "mentioner_id", limit: 25, null: false
t.string "source_id", limit: 36, null: false t.string "source_id", limit: 25, null: false
t.string "source_type", null: false t.string "source_type", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["mentionee_id"], name: "index_mentions_on_mentionee_id" t.index ["mentionee_id"], name: "index_mentions_on_mentionee_id"
@@ -310,53 +310,53 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["source_type", "source_id"], name: "index_mentions_on_source" t.index ["source_type", "source_id"], name: "index_mentions_on_source"
end end
create_table "notification_bundles", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "notification_bundles", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "ends_at", null: false t.datetime "ends_at", null: false
t.datetime "starts_at", null: false t.datetime "starts_at", null: false
t.integer "status", default: 0, null: false t.integer "status", default: 0, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["ends_at", "status"], name: "index_notification_bundles_on_ends_at_and_status" t.index ["ends_at", "status"], name: "index_notification_bundles_on_ends_at_and_status"
t.index ["user_id", "starts_at", "ends_at"], name: "idx_on_user_id_starts_at_ends_at_7eae5d3ac5" t.index ["user_id", "starts_at", "ends_at"], name: "idx_on_user_id_starts_at_ends_at_7eae5d3ac5"
t.index ["user_id", "status"], name: "index_notification_bundles_on_user_id_and_status" t.index ["user_id", "status"], name: "index_notification_bundles_on_user_id_and_status"
end end
create_table "notifications", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "notifications", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "creator_id", limit: 36 t.string "creator_id", limit: 25
t.datetime "read_at" t.datetime "read_at"
t.string "source_id", limit: 36, null: false t.string "source_id", limit: 25, null: false
t.string "source_type", null: false t.string "source_type", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["creator_id"], name: "index_notifications_on_creator_id" t.index ["creator_id"], name: "index_notifications_on_creator_id"
t.index ["source_type", "source_id"], name: "index_notifications_on_source" t.index ["source_type", "source_id"], name: "index_notifications_on_source"
t.index ["user_id", "read_at", "created_at"], name: "index_notifications_on_user_id_and_read_at_and_created_at", order: { read_at: :desc, created_at: :desc } t.index ["user_id", "read_at", "created_at"], name: "index_notifications_on_user_id_and_read_at_and_created_at", order: { read_at: :desc, created_at: :desc }
t.index ["user_id"], name: "index_notifications_on_user_id" t.index ["user_id"], name: "index_notifications_on_user_id"
end end
create_table "pins", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "pins", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["card_id", "user_id"], name: "index_pins_on_card_id_and_user_id", unique: true t.index ["card_id", "user_id"], name: "index_pins_on_card_id_and_user_id", unique: true
t.index ["card_id"], name: "index_pins_on_card_id" t.index ["card_id"], name: "index_pins_on_card_id"
t.index ["user_id"], name: "index_pins_on_user_id" t.index ["user_id"], name: "index_pins_on_user_id"
end end
create_table "push_subscriptions", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "push_subscriptions", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "auth_key" t.string "auth_key"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "endpoint" t.string "endpoint"
t.string "p256dh_key" t.string "p256dh_key"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_agent" t.string "user_agent"
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["endpoint", "p256dh_key", "auth_key"], name: "idx_on_endpoint_p256dh_key_auth_key_7553014576" t.index ["endpoint", "p256dh_key", "auth_key"], name: "idx_on_endpoint_p256dh_key_auth_key_7553014576"
t.index ["endpoint"], name: "index_push_subscriptions_on_endpoint" t.index ["endpoint"], name: "index_push_subscriptions_on_endpoint"
t.index ["user_agent"], name: "index_push_subscriptions_on_user_agent" t.index ["user_agent"], name: "index_push_subscriptions_on_user_agent"
@@ -364,16 +364,21 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["user_id"], name: "index_push_subscriptions_on_user_id" t.index ["user_id"], name: "index_push_subscriptions_on_user_id"
end end
create_table "reactions", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "reactions", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "comment_id", limit: 36, null: false t.string "comment_id", limit: 25, null: false
t.string "content", limit: 16, null: false t.string "content", limit: 16, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "reacter_id", limit: 36, null: false t.string "reacter_id", limit: 25, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["comment_id"], name: "index_reactions_on_comment_id" t.index ["comment_id"], name: "index_reactions_on_comment_id"
t.index ["reacter_id"], name: "index_reactions_on_reacter_id" t.index ["reacter_id"], name: "index_reactions_on_reacter_id"
end end
<<<<<<< HEAD
=======
<<<<<<< HEAD
<<<<<<< HEAD
>>>>>>> 5d9f248c (Compact the UUIDs to base36)
create_table "search_index_0", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "search_index_0", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.bigint "board_id", null: false t.bigint "board_id", null: false
t.bigint "card_id", null: false t.bigint "card_id", null: false
@@ -567,16 +572,23 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
end end
create_table "search_queries", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "search_queries", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
<<<<<<< HEAD
=======
>>>>>>> b2324bc8 (Update primary keys on customer data to UUIDs)
=======
create_table "search_queries", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
>>>>>>> dcbd66d5 (Compact the UUIDs to base36)
>>>>>>> 5d9f248c (Compact the UUIDs to base36)
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "terms", limit: 2000, null: false t.string "terms", limit: 2000, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["user_id", "terms"], name: "index_search_queries_on_user_id_and_terms", length: { terms: 255 } t.index ["user_id", "terms"], name: "index_search_queries_on_user_id_and_terms", length: { terms: 255 }
t.index ["user_id", "updated_at"], name: "index_search_queries_on_user_id_and_updated_at", unique: true t.index ["user_id", "updated_at"], name: "index_search_queries_on_user_id_and_updated_at", unique: true
t.index ["user_id"], name: "index_search_queries_on_user_id" t.index ["user_id"], name: "index_search_queries_on_user_id"
end end
create_table "search_results", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "search_results", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
end end
@@ -590,9 +602,9 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["identity_id"], name: "index_sessions_on_identity_id" t.index ["identity_id"], name: "index_sessions_on_identity_id"
end end
create_table "steps", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "steps", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.boolean "completed", default: false, null: false t.boolean "completed", default: false, null: false
t.text "content", null: false t.text "content", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
@@ -601,35 +613,35 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["card_id"], name: "index_steps_on_card_id" t.index ["card_id"], name: "index_steps_on_card_id"
end end
create_table "taggings", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "taggings", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "tag_id", limit: 36, null: false t.string "tag_id", limit: 25, null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["card_id", "tag_id"], name: "index_taggings_on_card_id_and_tag_id", unique: true t.index ["card_id", "tag_id"], name: "index_taggings_on_card_id_and_tag_id", unique: true
t.index ["tag_id"], name: "index_taggings_on_tag_id" t.index ["tag_id"], name: "index_taggings_on_tag_id"
end end
create_table "tags", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "tags", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "title" t.string "title"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["title"], name: "index_tags_on_title", unique: true t.index ["title"], name: "index_tags_on_title", unique: true
end end
create_table "user_settings", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "user_settings", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.integer "bundle_email_frequency", default: 0, null: false t.integer "bundle_email_frequency", default: 0, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "timezone_name" t.string "timezone_name"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.index ["user_id", "bundle_email_frequency"], name: "index_user_settings_on_user_id_and_bundle_email_frequency" t.index ["user_id", "bundle_email_frequency"], name: "index_user_settings_on_user_id_and_bundle_email_frequency"
t.index ["user_id"], name: "index_user_settings_on_user_id" t.index ["user_id"], name: "index_user_settings_on_user_id"
end end
create_table "users", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "users", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.boolean "active", default: true, null: false t.boolean "active", default: true, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.integer "membership_id" t.integer "membership_id"
@@ -640,42 +652,42 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_12_184932) do
t.index ["role"], name: "index_users_on_role" t.index ["role"], name: "index_users_on_role"
end end
create_table "watches", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "watches", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "card_id", limit: 36, null: false t.string "card_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "user_id", limit: 36, null: false t.string "user_id", limit: 25, null: false
t.boolean "watching", default: true, null: false t.boolean "watching", default: true, null: false
t.index ["card_id"], name: "index_watches_on_card_id" t.index ["card_id"], name: "index_watches_on_card_id"
t.index ["user_id", "card_id"], name: "index_watches_on_user_id_and_card_id" t.index ["user_id", "card_id"], name: "index_watches_on_user_id_and_card_id"
t.index ["user_id"], name: "index_watches_on_user_id" t.index ["user_id"], name: "index_watches_on_user_id"
end end
create_table "webhook_delinquency_trackers", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "webhook_delinquency_trackers", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.integer "consecutive_failures_count", default: 0 t.integer "consecutive_failures_count", default: 0
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "first_failure_at" t.datetime "first_failure_at"
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "webhook_id", limit: 36, null: false t.string "webhook_id", limit: 25, null: false
t.index ["webhook_id"], name: "index_webhook_delinquency_trackers_on_webhook_id" t.index ["webhook_id"], name: "index_webhook_delinquency_trackers_on_webhook_id"
end end
create_table "webhook_deliveries", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "webhook_deliveries", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "event_id", limit: 36, null: false t.string "event_id", limit: 25, null: false
t.text "request" t.text "request"
t.text "response" t.text "response"
t.string "state", null: false t.string "state", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "webhook_id", limit: 36, null: false t.string "webhook_id", limit: 25, null: false
t.index ["event_id"], name: "index_webhook_deliveries_on_event_id" t.index ["event_id"], name: "index_webhook_deliveries_on_event_id"
t.index ["webhook_id"], name: "index_webhook_deliveries_on_webhook_id" t.index ["webhook_id"], name: "index_webhook_deliveries_on_webhook_id"
end end
create_table "webhooks", id: { type: :string, limit: 36 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "webhooks", id: { type: :string, limit: 25 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "account_id", limit: 36 t.string "account_id", limit: 25
t.boolean "active", default: true, null: false t.boolean "active", default: true, null: false
t.string "board_id", limit: 36, null: false t.string "board_id", limit: 25, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.string "name" t.string "name"
t.string "signing_secret", null: false t.string "signing_secret", null: false
+1 -1
View File
@@ -101,7 +101,7 @@ class Import
end end
def generate_uuid def generate_uuid
SecureRandom.uuid_v7 UuidPrimaryKey.generate
end end
def setup_account def setup_account
+5 -4
View File
@@ -76,11 +76,12 @@ module FixturesTestHelper
class_methods do class_methods do
def identify(label, column_type = :integer) def identify(label, column_type = :integer)
if label.to_s.end_with?("_uuid") if label.to_s.end_with?("_uuid")
label_without_suffix = label.to_s.delete_suffix("_uuid") column_type = :uuid
super(label_without_suffix, :uuid) label = label.to_s.delete_suffix("_uuid")
else
super(label, column_type)
end end
return super(label, column_type) unless column_type == :uuid
UuidPrimaryKey.uuid_to_base36(super(label, column_type))
end end
end end
end end