Permalink
Please sign in to comment.
Showing
with
42 additions
and 0 deletions.
- +2 −0 app/models/article.rb
- +14 −0 db/migrate/20100509210407_create_articles.rb
- +21 −0 db/schema.rb
- +5 −0 spec/models/article_spec.rb
@@ -0,0 +1,2 @@ | ||
+class Article < ActiveRecord::Base | ||
+end |
@@ -0,0 +1,14 @@ | ||
+class CreateArticles < ActiveRecord::Migration | ||
+ def self.up | ||
+ create_table :articles do |t| | ||
+ t.string :title | ||
+ t.string :body | ||
+ | ||
+ t.timestamps | ||
+ end | ||
+ end | ||
+ | ||
+ def self.down | ||
+ drop_table :articles | ||
+ end | ||
+end |
21
db/schema.rb
@@ -0,0 +1,21 @@ | ||
+# This file is auto-generated from the current state of the database. Instead of editing this file, | ||
+# please use the migrations feature of Active Record to incrementally modify your database, and | ||
+# then regenerate this schema definition. | ||
+# | ||
+# Note that this schema.rb definition is the authoritative source for your database schema. If you need | ||
+# to create the application database on another system, you should be using db:schema:load, not running | ||
+# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations | ||
+# you'll amass, the slower it'll run and the greater likelihood for issues). | ||
+# | ||
+# It's strongly recommended to check this file into your version control system. | ||
+ | ||
+ActiveRecord::Schema.define(:version => 20100509210407) do | ||
+ | ||
+ create_table "articles", :force => true do |t| | ||
+ t.string "title" | ||
+ t.string "body" | ||
+ t.datetime "created_at" | ||
+ t.datetime "updated_at" | ||
+ end | ||
+ | ||
+end |
@@ -0,0 +1,5 @@ | ||
+require 'spec_helper' | ||
+ | ||
+describe Article do | ||
+ pending "add some examples to (or delete) #{__FILE__}" | ||
+end |
0 comments on commit
7435419