Created
December 16, 2019 09:43
-
-
Save r7kamura/7912fd2e9d92589486c6092be1b1f4f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'activerecord', '6.0.0' | |
gem 'sqlite3' | |
end | |
require 'active_record' | |
require 'logger' | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
ActiveRecord::Base.default_timezone = :local | |
ActiveRecord::Schema.define do | |
create_table :users, force: true do |t| | |
t.time :woke_up_at, default: '07:00:00', null: false | |
end | |
end | |
class User < ActiveRecord::Base | |
end | |
p User.create! |
Author
r7kamura
commented
Dec 16, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment