Skip to content

Commit

Permalink
added db/ and log/; moved .gitignores for those directories into the …
Browse files Browse the repository at this point in the history
…directories themselves
  • Loading branch information
James Rosen committed Jun 3, 2008
1 parent e56318a commit a1a12d5
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
config/database.yml
db
log/*.log
config/database.yml
2 changes: 2 additions & 0 deletions db/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.db
*.sqlite3
44 changes: 44 additions & 0 deletions db/migrate/20080526223738_alpha.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
class Alpha < ActiveRecord::Migration
def self.up
create_table 'users', :force => true do |t|
t.string 'login', :limit => 40, :nil => false
t.string 'crypted_password', :limit => 40, :nil => false
t.string 'salt', :limit => 40, :nil => false
t.string 'remember_token'
t.datetime 'remember_token_expires_at'
t.boolean 'is_admin', :default => false
t.string 'email_verification'
t.boolean 'email_verified', :default => false
t.timestamps
end

add_index 'users', ['login'], :name => 'index_users_on_login'

create_table 'profiles', :force => true do |t|
t.integer 'user_id'
t.string 'display_name'
t.text 'description'
t.string 'email', :nil => false
t.string 'cell_number'
t.string 'cell_carrier'
t.integer 'current_location'
t.timestamps
end

add_index "profiles", "user_id"

create_table :locations do |t|
t.string 'display_name', :nil => false
t.string 'type', :nil => false
t.decimal 'latitude', :precision => 11, :scale => 9 # xy.abcdefghi
t.decimal 'longitude', :precision => 12, :scale => 9 # xyz.abcdefghi
t.timestamps
end
end

def self.down
drop_table :locations
drop_table :profiles
drop_table :users
end
end
42 changes: 42 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 => 20080526223738) do

create_table "profiles", :force => true do |t|
t.integer "user_id"
t.string "display_name"
t.text "description"
t.string "email"
t.string "cell_number"
t.string "cell_carrier"
t.datetime "created_at"
t.datetime "updated_at"
end

add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id"

create_table "users", :force => true do |t|
t.string "login", :limit => 40
t.string "crypted_password", :limit => 40
t.string "salt", :limit => 40
t.string "remember_token"
t.datetime "remember_token_expires_at"
t.boolean "is_admin", :default => false
t.string "email_verification"
t.boolean "email_verified", :default => false
t.datetime "created_at"
t.datetime "updated_at"
end

add_index "users", ["login"], :name => "index_users_on_login"

end
1 change: 1 addition & 0 deletions log/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.log

0 comments on commit a1a12d5

Please sign in to comment.