From 7e2c3b980b2cf0554032af84b3413ae0e50d83b0 Mon Sep 17 00:00:00 2001 From: David Cornu Date: Fri, 7 Feb 2025 15:14:21 -0500 Subject: [PATCH] Ensure all `github_id` columns are 8 bytes --- db/migrate/20250207203053_embiggen_github_ids.rb | 8 ++++++++ test/dummy/db/schema.rb | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 db/migrate/20250207203053_embiggen_github_ids.rb diff --git a/db/migrate/20250207203053_embiggen_github_ids.rb b/db/migrate/20250207203053_embiggen_github_ids.rb new file mode 100644 index 000000000..209d126f6 --- /dev/null +++ b/db/migrate/20250207203053_embiggen_github_ids.rb @@ -0,0 +1,8 @@ +class EmbiggenGithubIds < ActiveRecord::Migration[7.2] + def change + change_column(:commit_deployments, :github_id, :bigint) + change_column(:github_hooks, :github_id, :bigint) + change_column(:teams, :github_id, :bigint) + change_column(:users, :github_id, :bigint) + end +end diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 08b1db7b2..00d2ed54c 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_08_21_003007) do +ActiveRecord::Schema[7.2].define(version: 2025_02_07_203053) do create_table "api_clients", force: :cascade do |t| t.text "permissions", limit: 65535 t.integer "creator_id", limit: 4 @@ -51,7 +51,7 @@ create_table "commit_deployments", force: :cascade do |t| t.integer "commit_id" t.integer "task_id" - t.integer "github_id" + t.bigint "github_id" t.string "api_url" t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -133,7 +133,7 @@ create_table "github_hooks", force: :cascade do |t| t.integer "stack_id", limit: 4 - t.integer "github_id", limit: 4 + t.bigint "github_id" t.string "event", limit: 50, null: false t.datetime "created_at" t.datetime "updated_at" @@ -340,7 +340,7 @@ end create_table "teams", force: :cascade do |t| - t.integer "github_id", limit: 4 + t.bigint "github_id" t.string "api_url", limit: 255 t.string "slug", limit: 255 t.string "name", limit: 255 @@ -351,7 +351,7 @@ end create_table "users", force: :cascade do |t| - t.integer "github_id", limit: 4 + t.bigint "github_id" t.string "name", limit: 255, null: false t.string "email", limit: 255 t.string "login", limit: 39