mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +08:00
Clean up schema
This commit is contained in:
parent
8367bf868e
commit
a8fb912d67
1 changed files with 2 additions and 100 deletions
102
db/schema.rb
102
db/schema.rb
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2025_06_06_082935) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "btree_gist"
|
||||
enable_extension "pg_trgm"
|
||||
|
@ -110,7 +110,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.boolean "file_processing"
|
||||
t.integer "team_id"
|
||||
t.integer "file_image_quality"
|
||||
t.boolean "previews_generated", default: false, null: false
|
||||
t.integer "view_mode", default: 0, null: false
|
||||
t.boolean "pdf_preview_processing", default: false
|
||||
t.index ["created_at"], name: "index_assets_on_created_at"
|
||||
|
@ -217,8 +216,8 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.datetime "done_at"
|
||||
t.date "due_date"
|
||||
t.date "start_date"
|
||||
t.boolean "due_date_notification_sent", default: false, null: false
|
||||
t.jsonb "metadata"
|
||||
t.boolean "due_date_notification_sent", default: false, null: false
|
||||
t.index "(('EX'::text || id)) gin_trgm_ops", name: "index_experiments_on_experiment_code", using: :gin
|
||||
t.index "trim_html_tags((name)::text) gin_trgm_ops", name: "index_experiments_on_name", using: :gin
|
||||
t.index "trim_html_tags(description) gin_trgm_ops", name: "index_experiments_on_description", using: :gin
|
||||
|
@ -381,15 +380,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.index ["team_id"], name: "index_label_templates_on_team_id"
|
||||
end
|
||||
|
||||
create_table "logs", force: :cascade do |t|
|
||||
t.integer "action_type", null: false
|
||||
t.string "user_name"
|
||||
t.jsonb "details", default: {}, null: false
|
||||
t.datetime "created_at", precision: nil, null: false
|
||||
t.datetime "updated_at", precision: nil, null: false
|
||||
t.index ["created_at", "action_type"], name: "index_logs_on_created_at_and_action_type"
|
||||
end
|
||||
|
||||
create_table "my_module_groups", force: :cascade do |t|
|
||||
t.datetime "created_at", precision: nil, null: false
|
||||
t.datetime "updated_at", precision: nil, null: false
|
||||
|
@ -492,8 +482,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.bigint "experiment_id", default: 0, null: false
|
||||
t.integer "state", limit: 2, default: 0
|
||||
t.datetime "completed_on", precision: nil
|
||||
t.integer "electronic_signature_status", default: 1
|
||||
t.datetime "electronic_signature_status_locked_at", precision: nil
|
||||
t.datetime "started_on", precision: nil
|
||||
t.bigint "my_module_status_id"
|
||||
t.boolean "status_changing", default: false
|
||||
|
@ -768,7 +756,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.datetime "restored_on", precision: nil
|
||||
t.bigint "archived_by_id"
|
||||
t.bigint "restored_by_id"
|
||||
t.boolean "locked", default: false, null: false
|
||||
t.string "external_id"
|
||||
t.integer "repository_rows_count", default: 0, null: false
|
||||
t.bigint "repository_template_id"
|
||||
|
@ -1146,64 +1133,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.index ["user_id"], name: "index_results_on_user_id"
|
||||
end
|
||||
|
||||
create_table "scinote_common_labviva_orders_lists", force: :cascade do |t|
|
||||
t.string "order_id"
|
||||
t.integer "user_id"
|
||||
t.jsonb "order"
|
||||
end
|
||||
|
||||
create_table "scinote_common_repository_labviva_values", force: :cascade do |t|
|
||||
t.string "data"
|
||||
t.string "lvid"
|
||||
t.string "sku"
|
||||
t.datetime "created_at", precision: nil
|
||||
t.datetime "updated_at", precision: nil
|
||||
t.integer "created_by_id", null: false
|
||||
t.integer "last_modified_by_id", null: false
|
||||
end
|
||||
|
||||
create_table "scinote_enterprise_electronic_signature_requests", force: :cascade do |t|
|
||||
t.string "type"
|
||||
t.integer "group"
|
||||
t.integer "reminder_count", default: 0, null: false
|
||||
t.bigint "user_id"
|
||||
t.string "signable_type"
|
||||
t.bigint "signable_id"
|
||||
t.bigint "fulfilled_by_id"
|
||||
t.bigint "created_by_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.boolean "fulfillable", default: true
|
||||
t.bigint "user_role_id"
|
||||
t.index ["fulfilled_by_id"], name: "electronic_signature_requests_on_fulfilled_by_id"
|
||||
t.index ["signable_type", "signable_id"], name: "electronic_signature_requests_on_signable_type_and_signable_id"
|
||||
t.index ["user_id"], name: "electronic_signature_requests_on_user_id"
|
||||
t.index ["user_role_id"], name: "index_electronic_signature_requests_on_user_role_id"
|
||||
end
|
||||
|
||||
create_table "scinote_enterprise_electronic_signatures", force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.string "user_full_name", null: false
|
||||
t.string "user_role", null: false
|
||||
t.string "user_email", null: false
|
||||
t.text "comment"
|
||||
t.integer "action"
|
||||
t.integer "type_of_signature"
|
||||
t.integer "reference_object_id"
|
||||
t.integer "reference_object_name"
|
||||
t.datetime "created_at", precision: nil, null: false
|
||||
t.datetime "updated_at", precision: nil, null: false
|
||||
t.boolean "revoked", default: false
|
||||
t.bigint "my_module_status_id"
|
||||
t.string "signable_type"
|
||||
t.bigint "signable_id"
|
||||
t.bigint "revoked_by_id"
|
||||
t.index ["created_at"], name: "index_scinote_enterprise_electronic_signatures_on_created_at"
|
||||
t.index ["my_module_status_id"], name: "index_electronic_signatures_on_my_module_status_id"
|
||||
t.index ["signable_type", "signable_id"], name: "electronic_signatures_signable_fkey"
|
||||
t.index ["user_id"], name: "index_scinote_enterprise_electronic_signatures_on_user_id"
|
||||
end
|
||||
|
||||
create_table "sessions", force: :cascade do |t|
|
||||
t.string "session_id", null: false
|
||||
t.jsonb "data"
|
||||
|
@ -1378,7 +1307,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.bigint "last_modified_by_id"
|
||||
t.string "description"
|
||||
t.bigint "space_taken", default: 1048576, null: false
|
||||
t.bigint "hub_spot_deal_id"
|
||||
t.boolean "shareable_links_enabled", default: false, null: false
|
||||
t.index ["created_by_id"], name: "index_teams_on_created_by_id"
|
||||
t.index ["last_modified_by_id"], name: "index_teams_on_last_modified_by_id"
|
||||
|
@ -1515,11 +1443,7 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.integer "invitations_count", default: 0
|
||||
t.bigint "current_team_id"
|
||||
t.string "authentication_token", limit: 30
|
||||
t.integer "organization_role", limit: 2, default: 0
|
||||
t.datetime "password_changed_at", precision: nil
|
||||
t.jsonb "settings", default: {}, null: false
|
||||
t.bigint "hub_spot_contact_id"
|
||||
t.integer "subscription_status", default: 0
|
||||
t.jsonb "variables", default: {}, null: false
|
||||
t.boolean "two_factor_auth_enabled", default: false, null: false
|
||||
t.string "otp_secret"
|
||||
|
@ -1529,7 +1453,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.string "unlock_token"
|
||||
t.string "api_key"
|
||||
t.datetime "api_key_expires_at", precision: nil
|
||||
t.datetime "last_seen_at", precision: nil
|
||||
t.datetime "api_key_created_at", precision: nil
|
||||
t.index "trim_html_tags((full_name)::text) gin_trgm_ops", name: "index_users_on_full_name", using: :gin
|
||||
t.index ["authentication_token"], name: "index_users_on_authentication_token", unique: true
|
||||
|
@ -1538,25 +1461,10 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
|
||||
t.index ["invitations_count"], name: "index_users_on_invitations_count"
|
||||
t.index ["invited_by_id"], name: "index_users_on_invited_by_id"
|
||||
t.index ["password_changed_at"], name: "index_users_on_password_changed_at"
|
||||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
||||
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
||||
end
|
||||
|
||||
create_table "versions", force: :cascade do |t|
|
||||
t.string "item_type"
|
||||
t.string "{:null=>false}"
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.text "object"
|
||||
t.text "object_changes"
|
||||
t.integer "team_id"
|
||||
t.datetime "created_at", precision: nil
|
||||
t.string "item_subtype"
|
||||
t.index ["item_type", "item_id", "team_id"], name: "index_versions_on_item_type_and_item_id_and_team_id"
|
||||
end
|
||||
|
||||
create_table "view_states", force: :cascade do |t|
|
||||
t.jsonb "state"
|
||||
t.bigint "user_id"
|
||||
|
@ -1784,12 +1692,6 @@ ActiveRecord::Schema[7.0].define(version: 202111301212633) do
|
|||
add_foreign_key "results", "users", column: "archived_by_id"
|
||||
add_foreign_key "results", "users", column: "last_modified_by_id"
|
||||
add_foreign_key "results", "users", column: "restored_by_id"
|
||||
add_foreign_key "scinote_common_repository_labviva_values", "users", column: "created_by_id"
|
||||
add_foreign_key "scinote_common_repository_labviva_values", "users", column: "last_modified_by_id"
|
||||
add_foreign_key "scinote_enterprise_electronic_signature_requests", "scinote_enterprise_electronic_signatures", column: "fulfilled_by_id"
|
||||
add_foreign_key "scinote_enterprise_electronic_signature_requests", "users"
|
||||
add_foreign_key "scinote_enterprise_electronic_signature_requests", "users", column: "created_by_id"
|
||||
add_foreign_key "scinote_enterprise_electronic_signatures", "scinote_enterprise_electronic_signatures", column: "revoked_by_id"
|
||||
add_foreign_key "shareable_links", "teams"
|
||||
add_foreign_key "shareable_links", "users", column: "created_by_id"
|
||||
add_foreign_key "shareable_links", "users", column: "last_modified_by_id"
|
||||
|
|
Loading…
Add table
Reference in a new issue