Sha256: f12fa9ccc21f2ff21a235d2a727729819e39c0bf68bc11b0103db03878c12e82

Contents?: true

Size: 453 Bytes

Versions: 11

Compression:

Stored size: 453 Bytes

Contents

class CreateNoteeImages < ActiveRecord::Migration
  class NoteeImage < ActiveRecord::Base; end

  def change
    create_table :notee_images do |t|

      t.string :content, null: false, uniqueness: true

      # if you have user_id
      # t.integer :user_id

      t.timestamps null: false
    end

    # create default image
    default_image = Notee::Image.create :content => 'aa'
    default_image.update_column("content", "default.png")
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
notee-0.4.0 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.7 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.6 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.5 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.4.1 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.4 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.3 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.2 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.1 db/migrate/20160605141547_create_notee_images.rb
notee-0.3.0 db/migrate/20160605141547_create_notee_images.rb
notee-0.2.9 db/migrate/20160605141547_create_notee_images.rb