Sha256: f70e3915689641fe9dcc561b9ac9a234a9087a188cb664eb909614c17e018283

Contents?: true

Size: 1.22 KB

Versions: 10

Compression:

Stored size: 1.22 KB

Contents

# -*- encoding : utf-8 -*-
class CreateLoyalCoreSkinFolders < ActiveRecord::Migration
  def change
    create_table :loyal_core_skin_folders do |t|
      t.string  :name             #名称
      t.string  :short_name       #简称

      t.integer :publish_status, :default => 0, :null => false

      t.integer :created_by
      t.string  :created_ip

      # 简介
      t.string  :instroduction

      # 描述
      t.text    :description

      t.integer :lang, default: 0, :null => false  #语言

      t.string :uuid

      t.string  :space      #命名空间
      t.string :permalink

      ###### avatar #############################
      t.string :avatar

      ###### for nested_ful #####################
      t.integer :parent_id
      t.integer :left_id
      t.integer :right_id
      t.integer :depth
      t.integer :children_count, default: 0

      ##### soft deleted #######################
      t.datetime :deleted_at

      t.timestamps
    end

    add_index :loyal_core_skin_folders, [:uuid]
    add_index :loyal_core_skin_folders, [:space, :permalink]
    add_index :loyal_core_skin_folders, [:parent_id]
    add_index :loyal_core_skin_folders, [:left_id]
    add_index :loyal_core_skin_folders, [:right_id]
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
loyal_core-0.0.11 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.10 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.8 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.7 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.6 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.5 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.4 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.3 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.2 db/migrate/20130610091558_create_loyal_core_skin_folders.rb
loyal_core-0.0.1 db/migrate/20130610091558_create_loyal_core_skin_folders.rb