mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Blog API example (#377)
This commit is contained in:
10
examples/apps/blog/schema/create.rb
Normal file
10
examples/apps/blog/schema/create.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
Reference in New Issue
Block a user