Skip to content

Commit 5294700

Browse files
committed
Update dummy app
1 parent 6f06114 commit 5294700

4 files changed

Lines changed: 23 additions & 6 deletions

File tree

spec/dummy/config/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test:
1313
adapter: postgresql
1414
host: <%= ENV.fetch('PG_DB_HOST') { '127.0.0.1' } %>
1515
database: <%= ENV.fetch('PG_DB_NAME') { 'active_storage_db_dummy_test' } %>
16-
username: <%= ENV.fetch('PG_DB_USERNAME') { 'root' } %>
16+
username: <%= ENV.fetch('PG_DB_USERNAME') { '' } %>
1717
password: <%= ENV.fetch('PG_DB_PASSWORD') { '' } %>
1818
encoding: utf8
1919
min_messages: warning

spec/dummy/db/migrate/20210405124104_create_active_storage_tables.active_storage.rb renamed to spec/dummy/db/migrate/20200702202021_create_active_storage_tables.active_storage.rb

File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
# This migration comes from active_storage_db (originally 20200702202022)
3+
4+
class CreateActiveStorageDBFiles < ActiveRecord::Migration[6.0]
5+
def change
6+
create_table :active_storage_db_files do |t|
7+
t.string :ref, null: false
8+
t.binary :data, null: false
9+
t.datetime :created_at, null: false
10+
11+
t.index [:ref], unique: true
12+
end
13+
end
14+
end

spec/dummy/db/schema.rb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2021_04_05_124104) do
13+
ActiveRecord::Schema.define(version: 2020_07_02_202022) do
1414

15-
create_table "active_storage_attachments", charset: "utf8", force: :cascade do |t|
15+
# These are extensions that must be enabled in order to support this database
16+
enable_extension "plpgsql"
17+
18+
create_table "active_storage_attachments", force: :cascade do |t|
1619
t.string "name", null: false
1720
t.string "record_type", null: false
1821
t.bigint "record_id", null: false
@@ -22,7 +25,7 @@
2225
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
2326
end
2427

25-
create_table "active_storage_blobs", charset: "utf8", force: :cascade do |t|
28+
create_table "active_storage_blobs", force: :cascade do |t|
2629
t.string "key", null: false
2730
t.string "filename", null: false
2831
t.string "content_type"
@@ -34,14 +37,14 @@
3437
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
3538
end
3639

37-
create_table "active_storage_db_files", charset: "utf8", force: :cascade do |t|
40+
create_table "active_storage_db_files", force: :cascade do |t|
3841
t.string "ref", null: false
3942
t.binary "data", null: false
4043
t.datetime "created_at", null: false
4144
t.index ["ref"], name: "index_active_storage_db_files_on_ref", unique: true
4245
end
4346

44-
create_table "active_storage_variant_records", charset: "utf8", force: :cascade do |t|
47+
create_table "active_storage_variant_records", force: :cascade do |t|
4548
t.bigint "blob_id", null: false
4649
t.string "variation_digest", null: false
4750
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true

0 commit comments

Comments
 (0)