Sha256: 585c6a132c06abb0cb6713b072ab6363b374f8705e9109d822ce514a0e7c5fa2
Contents?: true
Size: 545 Bytes
Versions: 2
Compression:
Stored size: 545 Bytes
Contents
class CreateNoteeCategories < ActiveRecord::Migration class NoteeCategory < ActiveRecord::Base; end def change create_table :notee_categories do |t| t.string :name, null: false, default: "category_name" t.string :slug, null: false, uniqueness: true t.integer :parent_id t.boolean :is_private, null: false, default: false t.timestamps null: false end add_index :notee_categories, :slug, :unique => true # create default category Notee::Category.create :name => 'No_Category' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
notee-0.4.0 | db/migrate/20160605141510_create_notee_categories.rb |
notee-0.3.7 | db/migrate/20160605141510_create_notee_categories.rb |