Permalink
Browse files

Add first Sequel migration to create articles table

  • Loading branch information...
avdgaag committed Mar 24, 2015
1 parent bb301c3 commit 64f0e7eab38290bbdd645cf09b66ad3c3197863d
Showing with 26 additions and 0 deletions.
  1. +16 −0 bin/sequel
  2. +10 −0 db/migrations/001_create_articles.rb
View
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'sequel' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'rubygems'
require 'bundler/setup'
load Gem.bin_path('sequel', 'sequel')
@@ -0,0 +1,10 @@
Sequel.migration do
change do
create_table :articles do
primary_key :id
String :title, null: false
String :body, text: true, null: false
Time :created_at, null: false, default: 'now()'
end
end
end

0 comments on commit 64f0e7e

Please sign in to comment.