@ -10,7 +10,7 @@
#
#
# 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 . 0 ] . define ( version : 2025_09_ 10_191227 ) do
ActiveRecord :: Schema [ 8 . 0 ] . define ( version : 2025_09_ 24_174100 ) do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension " btree_gin "
enable_extension " btree_gin "
enable_extension " pg_catalog.plpgsql "
enable_extension " pg_catalog.plpgsql "
@ -43,14 +43,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
t . index [ " account_id " ] , name : " index_account_configs_on_account_id "
t . index [ " account_id " ] , name : " index_account_configs_on_account_id "
end
end
create_table " account_groups " , force : :cascade do | t |
t . integer " external_account_group_id " , null : false
t . string " name " , null : false
t . datetime " created_at " , null : false
t . datetime " updated_at " , null : false
t . index [ " external_account_group_id " ] , name : " index_account_groups_on_external_account_group_id " , unique : true
end
create_table " account_linked_accounts " , force : :cascade do | t |
create_table " account_linked_accounts " , force : :cascade do | t |
t . integer " account_id " , null : false
t . integer " account_id " , null : false
t . integer " linked_account_id " , null : false
t . integer " linked_account_id " , null : false
@ -71,8 +63,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
t . string " uuid " , null : false
t . string " uuid " , null : false
t . datetime " archived_at "
t . datetime " archived_at "
t . integer " external_account_id "
t . integer " external_account_id "
t . bigint " account_group_id "
t . index [ " account_group_id " ] , name : " index_accounts_on_account_group_id "
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
t . index [ " uuid " ] , name : " index_accounts_on_uuid " , unique : true
t . index [ " uuid " ] , name : " index_accounts_on_uuid " , unique : true
end
end
@ -238,6 +228,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
t . datetime " updated_at " , null : false
t . datetime " updated_at " , null : false
t . jsonb " extra_params " , default : { } , null : false
t . jsonb " extra_params " , default : { } , null : false
t . string " submissions_endpoint "
t . string " submissions_endpoint "
t . integer " global_partnership_id "
end
end
create_table " oauth_access_grants " , force : :cascade do | t |
create_table " oauth_access_grants " , force : :cascade do | t |
@ -282,6 +273,14 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
t . index [ " uid " ] , name : " index_oauth_applications_on_uid " , unique : true
t . index [ " uid " ] , name : " index_oauth_applications_on_uid " , unique : true
end
end
create_table " partnerships " , force : :cascade do | t |
t . integer " external_partnership_id " , null : false
t . string " name " , null : false
t . datetime " created_at " , null : false
t . datetime " updated_at " , null : false
t . index [ " external_partnership_id " ] , name : " index_partnerships_on_external_partnership_id " , unique : true
end
create_table " search_entries " , force : :cascade do | t |
create_table " search_entries " , force : :cascade do | t |
t . string " record_type " , null : false
t . string " record_type " , null : false
t . bigint " record_id " , null : false
t . bigint " record_id " , null : false
@ -377,10 +376,10 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
t . datetime " archived_at "
t . datetime " archived_at "
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 . bigint " account_group_id "
t . bigint " partnership_id "
t . index [ " account_group_id " ] , name : " index_template_folders_on_account_group_id "
t . index [ " account_id " ] , name : " index_template_folders_on_account_id "
t . index [ " account_id " ] , name : " index_template_folders_on_account_id "
t . index [ " author_id " ] , name : " index_template_folders_on_author_id "
t . index [ " author_id " ] , name : " index_template_folders_on_author_id "
t . index [ " partnership_id " ] , name : " index_template_folders_on_partnership_id "
end
end
create_table " template_sharings " , force : :cascade do | t |
create_table " template_sharings " , force : :cascade do | t |
@ -410,14 +409,14 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
t . text " preferences " , null : false
t . text " preferences " , null : false
t . boolean " shared_link " , default : false , null : false
t . boolean " shared_link " , default : false , null : false
t . text " external_data_fields "
t . text " external_data_fields "
t . bigint " account_group_id "
t . bigint " partnership_id "
t . index [ " account_group_id " ] , name : " index_templates_on_account_group_id "
t . index [ " account_id " , " folder_id " , " id " ] , name : " index_templates_on_account_id_and_folder_id_and_id " , where : " (archived_at IS NULL) "
t . index [ " account_id " , " folder_id " , " id " ] , name : " index_templates_on_account_id_and_folder_id_and_id " , where : " (archived_at IS NULL) "
t . index [ " account_id " , " id " ] , name : " index_templates_on_account_id_and_id_archived " , where : " (archived_at IS NOT NULL) "
t . index [ " account_id " , " id " ] , name : " index_templates_on_account_id_and_id_archived " , where : " (archived_at IS NOT NULL) "
t . index [ " account_id " ] , name : " index_templates_on_account_id "
t . index [ " account_id " ] , name : " index_templates_on_account_id "
t . index [ " author_id " ] , name : " index_templates_on_author_id "
t . index [ " author_id " ] , name : " index_templates_on_author_id "
t . index [ " external_id " ] , name : " index_templates_on_external_id "
t . index [ " external_id " ] , name : " index_templates_on_external_id "
t . index [ " folder_id " ] , name : " index_templates_on_folder_id "
t . index [ " folder_id " ] , name : " index_templates_on_folder_id "
t . index [ " partnership_id " ] , name : " index_templates_on_partnership_id "
t . index [ " slug " ] , name : " index_templates_on_slug " , unique : true
t . index [ " slug " ] , name : " index_templates_on_slug " , unique : true
end
end
@ -457,8 +456,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
t . integer " consumed_timestep "
t . integer " consumed_timestep "
t . boolean " otp_required_for_login " , default : false , null : false
t . boolean " otp_required_for_login " , default : false , null : false
t . integer " external_user_id "
t . integer " external_user_id "
t . bigint " account_group_id "
t . index [ " account_group_id " ] , name : " index_users_on_account_group_id "
t . index [ " account_id " ] , name : " index_users_on_account_id "
t . index [ " account_id " ] , name : " index_users_on_account_id "
t . index [ " email " ] , name : " index_users_on_email " , unique : true
t . index [ " email " ] , name : " index_users_on_email " , unique : true
t . index [ " external_user_id " ] , name : " index_users_on_external_user_id " , unique : true
t . index [ " external_user_id " ] , name : " index_users_on_external_user_id " , unique : true
@ -484,7 +481,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
add_foreign_key " account_configs " , " accounts "
add_foreign_key " account_configs " , " accounts "
add_foreign_key " account_linked_accounts " , " accounts "
add_foreign_key " account_linked_accounts " , " accounts "
add_foreign_key " account_linked_accounts " , " accounts " , column : " linked_account_id "
add_foreign_key " account_linked_accounts " , " accounts " , column : " linked_account_id "
add_foreign_key " accounts " , " account_groups "
add_foreign_key " active_storage_attachments " , " active_storage_blobs " , column : " blob_id "
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 " active_storage_variant_records " , " active_storage_blobs " , column : " blob_id "
add_foreign_key " document_generation_events " , " submitters "
add_foreign_key " document_generation_events " , " submitters "
@ -503,16 +499,15 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_10_191227) do
add_foreign_key " submissions " , " users " , column : " created_by_user_id "
add_foreign_key " submissions " , " users " , column : " created_by_user_id "
add_foreign_key " submitters " , " submissions "
add_foreign_key " submitters " , " submissions "
add_foreign_key " template_accesses " , " templates "
add_foreign_key " template_accesses " , " templates "
add_foreign_key " template_folders " , " account_groups "
add_foreign_key " template_folders " , " accounts "
add_foreign_key " template_folders " , " accounts "
add_foreign_key " template_folders " , " partnerships "
add_foreign_key " template_folders " , " users " , column : " author_id "
add_foreign_key " template_folders " , " users " , column : " author_id "
add_foreign_key " template_sharings " , " templates "
add_foreign_key " template_sharings " , " templates "
add_foreign_key " templates " , " account_groups "
add_foreign_key " templates " , " accounts "
add_foreign_key " templates " , " accounts "
add_foreign_key " templates " , " partnerships "
add_foreign_key " templates " , " template_folders " , column : " folder_id "
add_foreign_key " templates " , " template_folders " , column : " folder_id "
add_foreign_key " templates " , " users " , column : " author_id "
add_foreign_key " templates " , " users " , column : " author_id "
add_foreign_key " user_configs " , " users "
add_foreign_key " user_configs " , " users "
add_foreign_key " users " , " account_groups "
add_foreign_key " users " , " accounts "
add_foreign_key " users " , " accounts "
add_foreign_key " webhook_urls " , " accounts "
add_foreign_key " webhook_urls " , " accounts "
end
end