Files
fn-serverless/examples/apps/blog/schema/create.rb
2017-09-29 15:59:39 -07:00

11 lines
233 B
Ruby

require "sequel"
DB = Sequel.connect("mysql2://docker.for.mac.localhost/blog?user=#{ENV['DB_USER']}&password=#{ENV['DB_PASS']}")
# create a posts table
DB.create_table :posts do
primary_key :id
String :title
String :body
end