diff --git a/db/migrate/20251117202517_change_usage_limit_to_bigint_in_account_join_codes.rb b/db/migrate/20251117202517_change_usage_limit_to_bigint_in_account_join_codes.rb new file mode 100644 index 000000000..f7289e5a5 --- /dev/null +++ b/db/migrate/20251117202517_change_usage_limit_to_bigint_in_account_join_codes.rb @@ -0,0 +1,6 @@ +class ChangeUsageLimitToBigintInAccountJoinCodes < ActiveRecord::Migration[8.2] + def change + change_column :account_join_codes, :usage_count, :bigint + change_column :account_join_codes, :usage_limit, :bigint + end +end diff --git a/db/schema.rb b/db/schema.rb index ea70eb668..abb762d69 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.2].define(version: 2025_11_17_192434) do +ActiveRecord::Schema[8.2].define(version: 2025_11_17_202517) do create_table "accesses", id: :uuid, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.datetime "accessed_at" t.uuid "account_id", null: false @@ -30,8 +30,8 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_17_192434) do t.string "code", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.integer "usage_count", default: 0, null: false - t.integer "usage_limit", default: 10, null: false + t.bigint "usage_count", default: 0, null: false + t.bigint "usage_limit", default: 10, null: false t.index ["account_id", "code"], name: "index_account_join_codes_on_account_id_and_code", unique: true end diff --git a/script/import-sqlite-database.rb b/script/import-sqlite-database.rb index 86a16822a..ef678e5fd 100755 --- a/script/import-sqlite-database.rb +++ b/script/import-sqlite-database.rb @@ -128,11 +128,11 @@ class Import else @account = Account.create_with_admin_user( account: { - external_account_id: account.external_account_id.to_s, - name: account.name + external_account_id: account.external_account_id, + name: account.name.truncate(255, omission: "") }, owner: { - name: oldest_admin.name, + name: oldest_admin.name.truncate(255, omission: ""), identity: new_identity } ) @@ -169,7 +169,7 @@ class Import User.create!( account: account, identity: new_identity, - name: old_user.name, + name: old_user.name.truncate(255, omission: ""), role: old_user.role, active: old_user.active, ) @@ -198,7 +198,7 @@ class Import new_board = Board.create!( account_id: account.id, creator_id: mapping[:users][old_board.creator_id], - name: old_board.name, + name: old_board.name.truncate(255, omission: ""), all_access: old_board.all_access, created_at: old_board.created_at, updated_at: old_board.updated_at @@ -229,7 +229,7 @@ class Import new_column = Column.create!( account_id: account.id, board_id: mapping[:boards][old_column.board_id], - name: old_column.name, + name: old_column.name.truncate(255, omission: ""), color: old_column.color, position: old_column.position, created_at: old_column.created_at, @@ -848,7 +848,7 @@ class Import new_webhook = Webhook.create!( account_id: account.id, board_id: mapping[:boards][old_webhook.board_id], - name: old_webhook.name, + name: old_webhook.name.truncate(255, omission: ""), url: old_webhook.url, signing_secret: old_webhook.signing_secret, subscribed_actions: subscribed_actions,