зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-05 19:25:51 +03:00
Add specs configuration
Этот коммит содержится в:
@@ -0,0 +1,27 @@
|
||||
# This migration comes from active_storage (originally 20170806125915)
|
||||
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :active_storage_blobs do |t|
|
||||
t.string :key, null: false
|
||||
t.string :filename, null: false
|
||||
t.string :content_type
|
||||
t.text :metadata
|
||||
t.bigint :byte_size, null: false
|
||||
t.string :checksum, null: false
|
||||
t.datetime :created_at, null: false
|
||||
|
||||
t.index [ :key ], unique: true
|
||||
end
|
||||
|
||||
create_table :active_storage_attachments do |t|
|
||||
t.string :name, null: false
|
||||
t.references :record, null: false, polymorphic: true, index: false
|
||||
t.references :blob, null: false
|
||||
|
||||
t.datetime :created_at, null: false
|
||||
|
||||
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
|
||||
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,16 @@
|
||||
class CreateActiveAdminComments < ActiveRecord::Migration[6.0]
|
||||
def self.up
|
||||
create_table :active_admin_comments do |t|
|
||||
t.string :namespace
|
||||
t.text :body
|
||||
t.references :resource, polymorphic: true
|
||||
t.references :author, polymorphic: true
|
||||
t.timestamps
|
||||
end
|
||||
add_index :active_admin_comments, [:namespace]
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :active_admin_comments
|
||||
end
|
||||
end
|
||||
13
spec/dummy/db/migrate/20180607053251_create_authors.rb
Обычный файл
13
spec/dummy/db/migrate/20180607053251_create_authors.rb
Обычный файл
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateAuthors < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :authors do |t|
|
||||
t.string :name
|
||||
t.integer :age
|
||||
t.string :email
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
12
spec/dummy/db/migrate/20180607053254_create_profiles.rb
Обычный файл
12
spec/dummy/db/migrate/20180607053254_create_profiles.rb
Обычный файл
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateProfiles < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :profiles do |t|
|
||||
t.text :description
|
||||
t.belongs_to :author, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
spec/dummy/db/migrate/20180607053255_create_tags.rb
Обычный файл
11
spec/dummy/db/migrate/20180607053255_create_tags.rb
Обычный файл
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateTags < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :tags do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
12
spec/dummy/db/migrate/20180607053257_create_post_tags.rb
Обычный файл
12
spec/dummy/db/migrate/20180607053257_create_post_tags.rb
Обычный файл
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreatePostTags < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :post_tags do |t|
|
||||
t.belongs_to :post, foreign_key: true
|
||||
t.belongs_to :tag, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
17
spec/dummy/db/migrate/20180607053739_create_posts.rb
Обычный файл
17
spec/dummy/db/migrate/20180607053739_create_posts.rb
Обычный файл
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreatePosts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :posts do |t|
|
||||
t.string :title
|
||||
t.text :description
|
||||
t.belongs_to :author, foreign_key: true
|
||||
t.string :category
|
||||
t.datetime :dt
|
||||
t.float :position
|
||||
t.boolean :published
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Ссылка в новой задаче
Block a user