Sha256: 4f9276fca1d6799327cabe55d62f98e1ec82130d619f64a84564b3728feb3842
Contents?: true
Size: 769 Bytes
Versions: 20
Compression:
Stored size: 769 Bytes
Contents
class CreateSimplecPages < ActiveRecord::Migration[5.0] def change create_table :simplec_pages, id: :uuid, default: 'gen_random_uuid()' do |t| t.string :type t.uuid :subdomain_id t.uuid :parent_id t.string :path t.string :slug t.string :title t.string :meta_description t.jsonb :fields t.string :layout t.timestamps end add_index :simplec_pages, :type add_index :simplec_pages, :subdomain_id add_index :simplec_pages, :parent_id add_index :simplec_pages, :path add_index :simplec_pages, [:subdomain_id, :path], unique: true reversible do |dir| dir.up { execute "ALTER TABLE simplec_pages ALTER COLUMN fields SET DEFAULT '{}'::JSONB" } end end end
Version data entries
20 entries across 20 versions & 1 rubygems