Sha256: 73ca4c2ff52bc9fe1092ea0be2ff95be9b4389b1bbef9ec99a61b6b2e3ac8c50
Contents?: true
Size: 676 Bytes
Versions: 5
Compression:
Stored size: 676 Bytes
Contents
require "bundler/setup" require "active_record" ActiveRecord::Base.establish_connection(ENV.fetch('DATABASE_URL')) ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define do create_table :users, force: true do |t| t.string :name t.string :email t.boolean :approved t.integer :age t.datetime :birthday t.timestamps null: false end add_index :users, :email, unique: true end class User < ActiveRecord::Base; end 1000.times do |i| User.create!({ name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", email: "foobar#{"%03d" % i}@email.com", approved: false, age: 51, birthday: DateTime.now }) end
Version data entries
5 entries across 5 versions & 1 rubygems