Skip to content

Перайсці на PostgreSQL у development #545

@yahor

Description

@yahor

Каб не было праблем з схемай пасля пракаткі міграцыі ў development прапаную SQLlite замфніць на PostgreSQL.

Primary keys - By default, Active Record will use an integer column named id as the table's primary key (bigint for PostgreSQL and MySQL, integer for SQLite). When using Active Record Migrations to create your tables, this column will be automatically created.

$ git diff db/schema.rb
diff --git a/db/schema.rb b/db/schema.rb
index 8ff8a3f..aa3a884 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -34,7 +34,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_04_23_224009) do
   end
 
   create_table "active_storage_variant_records", force: :cascade do |t|
-    t.bigint "blob_id", null: false
+    t.integer "blob_id", null: false
     t.string "variation_digest", null: false
     t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
   end

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions