Permalink
Browse files

changing to mysql, adding a user mode

  • Loading branch information...
1 parent 371cb2c commit 6344899eb76f8f59c72941cf01435034c30e10f5 @tenderlove committed May 31, 2011
Showing with 55 additions and 9 deletions.
  1. +1 −1 Gemfile
  2. +2 −2 Gemfile.lock
  3. +2 −0 app/models/user.rb
  4. +6 −6 config/database.yml
  5. +9 −0 db/migrate/20110531171954_create_users.rb
  6. +21 −0 db/schema.rb
  7. +7 −0 test/fixtures/users.yml
  8. +7 −0 test/unit/user_test.rb
View
@@ -5,7 +5,7 @@ gem 'rails', '3.1.0.rc1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
-gem 'sqlite3'
+gem 'mysql'
# Asset template engines
gem 'sass-rails'
View
@@ -53,6 +53,7 @@ GEM
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
+ mysql (2.8.1)
polyglot (0.3.1)
rack (1.3.0)
rack-cache (1.0.2)
@@ -87,7 +88,6 @@ GEM
hike (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.3)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.9)
@@ -105,8 +105,8 @@ PLATFORMS
DEPENDENCIES
coffee-script
jquery-rails
+ mysql
rails (= 3.1.0.rc1)
sass-rails
- sqlite3
turn
uglifier
View
@@ -0,0 +1,2 @@
+class User < ActiveRecord::Base
+end
View
@@ -4,22 +4,22 @@
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
- adapter: sqlite3
- database: db/development.sqlite3
+ adapter: mysql
+ database: hello_development
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
- adapter: sqlite3
- database: db/test.sqlite3
+ adapter: mysql
+ database: hello_development
pool: 5
timeout: 5000
production:
- adapter: sqlite3
- database: db/production.sqlite3
+ adapter: mysql
+ database: hello_development
pool: 5
timeout: 5000
@@ -0,0 +1,9 @@
+class CreateUsers < ActiveRecord::Migration
+ def change
+ create_table :users do |t|
+ t.string :name
+
+ t.timestamps
+ end
+ end
+end
View
@@ -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 => 20110531171954) do
+
+ create_table "users", :force => true do |t|
+ t.string "name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+end
View
@@ -0,0 +1,7 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
+
+one:
+ name: MyString
+
+two:
+ name: MyString
View
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class UserTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end

0 comments on commit 6344899

Please sign in to comment.