Initial Commit
This commit is contained in:
27
db/dump
Executable file
27
db/dump
Executable file
@@ -0,0 +1,27 @@
|
||||
BEGIN TRANSACTION;
|
||||
CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL);
|
||||
INSERT INTO "schema_migrations" VALUES('20100806225855');
|
||||
INSERT INTO "schema_migrations" VALUES('20100816185859');
|
||||
INSERT INTO "schema_migrations" VALUES('20100820221313');
|
||||
INSERT INTO "schema_migrations" VALUES('20100917213526');
|
||||
INSERT INTO "schema_migrations" VALUES('20101011194353');
|
||||
CREATE TABLE "assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "tag" varchar(255), "name" varchar(255), "serial" varchar(255), "category" varchar(255), "make" varchar(255), "warranty" date, "password" varchar(255), "location" varchar(255), "assigned" varchar(255), "status" varchar(255), "verified" datetime, "created_at" datetime, "updated_at" datetime);
|
||||
INSERT INTO "assets" VALUES(3,'0002','computer2','2039480uosj','Computer','Dell Latitude D510','2010-10-22','adkjf','here','me','working','2010-10-22 22:29:00','2010-10-22 22:29:50','2010-10-22 22:29:50');
|
||||
DELETE FROM sqlite_sequence;
|
||||
INSERT INTO "sqlite_sequence" VALUES('users',2);
|
||||
INSERT INTO "sqlite_sequence" VALUES('assets',3);
|
||||
INSERT INTO "sqlite_sequence" VALUES('softwares',14);
|
||||
CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "asset_id" integer, "commenter" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime);
|
||||
CREATE TABLE "softwares" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "key" varchar(255), "asset_id" integer, "installed" date, "installed_by" varchar(255), "modified" date, "modified_by" varchar(255), "note" varchar(255), "created_at" datetime, "updated_at" datetime);
|
||||
INSERT INTO "softwares" VALUES(2,'jason','201947',2,'2010-10-11','jason','2010-10-11','Jason Katz','','2010-10-11 23:09:17','2010-10-11 23:09:17');
|
||||
INSERT INTO "softwares" VALUES(12,'adobe','23i90owks',3,'2010-10-22','me','2010-10-22','Jason Katz','asdl;kfj','2010-10-22 22:57:16','2010-10-22 22:57:16');
|
||||
INSERT INTO "softwares" VALUES(13,'word','',2,'2010-10-22','will','2010-10-22','Jason Katz','','2010-10-22 22:58:45','2010-10-22 22:58:45');
|
||||
INSERT INTO "softwares" VALUES(14,'excel','',3,'2010-10-22','you','2010-10-22','Jason Katz','','2010-10-22 23:00:28','2010-10-22 23:00:28');
|
||||
CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(128) DEFAULT '' NOT NULL, "password_salt" varchar(255) DEFAULT '' NOT NULL, "confirmation_token" varchar(255), "confirmed_at" datetime, "confirmation_sent_at" datetime, "reset_password_token" varchar(255), "remember_token" varchar(255), "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime, "name" varchar(255));
|
||||
INSERT INTO "users" VALUES(1,'wbradley@trilliumresidential.com','6e98e84ed86d1e215cadc46e8976bd4872008152','7iPudFfKHqQfKRYw0h1p',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,'2010-10-11 20:50:44','2010-10-11 20:50:44','Will Bradley');
|
||||
INSERT INTO "users" VALUES(2,'jasonkatz88@gmail.com','47a217c50c263f91edb300952b69c7e4c117fec3','hBU5TkwizhFaav-2Z8gD',NULL,NULL,NULL,NULL,NULL,NULL,1,'2010-10-11 20:53:47','2010-10-11 20:53:47','127.0.0.1','127.0.0.1','2010-10-11 20:50:44','2010-10-11 20:53:47','Jason Katz');
|
||||
CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version");
|
||||
CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email");
|
||||
CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token");
|
||||
CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token");
|
||||
COMMIT;
|
||||
23
db/migrate/20100806225855_create_assets.rb
Executable file
23
db/migrate/20100806225855_create_assets.rb
Executable file
@@ -0,0 +1,23 @@
|
||||
class CreateAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :assets do |t|
|
||||
t.string :tag
|
||||
t.string :name
|
||||
t.string :serial
|
||||
t.string :category
|
||||
t.string :make
|
||||
t.date :warranty
|
||||
t.string :password
|
||||
t.string :location
|
||||
t.string :assigned
|
||||
t.string :status
|
||||
t.datetime :verified
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :assets
|
||||
end
|
||||
end
|
||||
15
db/migrate/20100816185859_create_comments.rb
Executable file
15
db/migrate/20100816185859_create_comments.rb
Executable file
@@ -0,0 +1,15 @@
|
||||
class CreateComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :comments do |t|
|
||||
t.integer :asset_id
|
||||
t.string :commenter
|
||||
t.text :body
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :comments
|
||||
end
|
||||
end
|
||||
19
db/migrate/20100820221313_create_softwares.rb
Executable file
19
db/migrate/20100820221313_create_softwares.rb
Executable file
@@ -0,0 +1,19 @@
|
||||
class CreateSoftwares < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :softwares do |t|
|
||||
t.string :name
|
||||
t.string :key
|
||||
t.integer :asset_id
|
||||
t.date :installed
|
||||
t.string :installed_by
|
||||
t.string :modified_by
|
||||
t.string :note
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :softwares
|
||||
end
|
||||
end
|
||||
23
db/migrate/20100917213526_devise_create_users.rb
Executable file
23
db/migrate/20100917213526_devise_create_users.rb
Executable file
@@ -0,0 +1,23 @@
|
||||
class DeviseCreateUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table(:users) do |t|
|
||||
t.database_authenticatable :null => false
|
||||
t.confirmable
|
||||
t.recoverable
|
||||
t.rememberable
|
||||
t.trackable
|
||||
# t.lockable
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :users, :email, :unique => true
|
||||
add_index :users, :confirmation_token, :unique => true
|
||||
add_index :users, :reset_password_token, :unique => true
|
||||
# add_index :users, :unlock_token, :unique => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :users
|
||||
end
|
||||
end
|
||||
9
db/migrate/20101011194353_add_name_to_users.rb
Executable file
9
db/migrate/20101011194353_add_name_to_users.rb
Executable file
@@ -0,0 +1,9 @@
|
||||
class AddNameToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :users, :name, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :name
|
||||
end
|
||||
end
|
||||
9
db/migrate/20101106001531_add_modified_by_to_assets.rb
Executable file
9
db/migrate/20101106001531_add_modified_by_to_assets.rb
Executable file
@@ -0,0 +1,9 @@
|
||||
class AddModifiedByToAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :assets, :modified_by, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :assets, :modified_by
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
class AddMediaLocationToSoftwares < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :softwares, :media_location, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :softwares, :media_location
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110608230922_remove_verified_from_assets.rb
Normal file
9
db/migrate/20110608230922_remove_verified_from_assets.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class RemoveVerifiedFromAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :assets, :verified
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :assets, :verified, :datetime
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110608231050_add_updated_to_assets.rb
Normal file
9
db/migrate/20110608231050_add_updated_to_assets.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AddUpdatedToAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :assets, :updated, :date
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :assets, :updated
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110608231728_remove_password_from_assets.rb
Normal file
9
db/migrate/20110608231728_remove_password_from_assets.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class RemovePasswordFromAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :assets, :password
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :assets, :password, :string
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110608232032_remove_name_from_assets.rb
Normal file
9
db/migrate/20110608232032_remove_name_from_assets.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class RemoveNameFromAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :assets, :name
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :assets, :name, :string
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110608232428_add_model_to_assets.rb
Normal file
9
db/migrate/20110608232428_add_model_to_assets.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AddModelToAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :assets, :model, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :assets, :model
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110608234843_remove_name_from_softwares.rb
Normal file
9
db/migrate/20110608234843_remove_name_from_softwares.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class RemoveNameFromSoftwares < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :softwares, :name
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :softwares, :name, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
class AddCompanyVersionToSoftwares < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :softwares, :company, :string
|
||||
add_column :softwares, :version, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :softwares, :version
|
||||
remove_column :softwares, :company
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110609000237_add_name_to_assets.rb
Normal file
9
db/migrate/20110609000237_add_name_to_assets.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AddNameToAssets < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :assets, :name, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :assets, :name
|
||||
end
|
||||
end
|
||||
9
db/migrate/20110609170707_add_platform_to_softwares.rb
Normal file
9
db/migrate/20110609170707_add_platform_to_softwares.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AddPlatformToSoftwares < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :softwares, :platform, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :softwares, :platform
|
||||
end
|
||||
end
|
||||
78
db/schema.rb
Executable file
78
db/schema.rb
Executable file
@@ -0,0 +1,78 @@
|
||||
# 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 => 20110609170707) do
|
||||
|
||||
create_table "assets", :force => true do |t|
|
||||
t.string "tag"
|
||||
t.string "serial"
|
||||
t.string "category"
|
||||
t.string "make"
|
||||
t.date "warranty"
|
||||
t.string "location"
|
||||
t.string "assigned"
|
||||
t.string "status"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "modified_by"
|
||||
t.date "updated"
|
||||
t.string "model"
|
||||
t.string "name"
|
||||
end
|
||||
|
||||
create_table "comments", :force => true do |t|
|
||||
t.integer "asset_id"
|
||||
t.string "commenter"
|
||||
t.text "body"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "softwares", :force => true do |t|
|
||||
t.string "key"
|
||||
t.integer "asset_id"
|
||||
t.date "installed"
|
||||
t.string "installed_by"
|
||||
t.string "modified_by"
|
||||
t.string "note"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "media_location"
|
||||
t.string "company"
|
||||
t.string "version"
|
||||
t.string "platform"
|
||||
end
|
||||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||
t.string "password_salt", :default => "", :null => false
|
||||
t.string "confirmation_token"
|
||||
t.datetime "confirmed_at"
|
||||
t.datetime "confirmation_sent_at"
|
||||
t.string "reset_password_token"
|
||||
t.string "remember_token"
|
||||
t.datetime "remember_created_at"
|
||||
t.integer "sign_in_count", :default => 0
|
||||
t.datetime "current_sign_in_at"
|
||||
t.datetime "last_sign_in_at"
|
||||
t.string "current_sign_in_ip"
|
||||
t.string "last_sign_in_ip"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "name"
|
||||
end
|
||||
|
||||
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
|
||||
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
||||
|
||||
end
|
||||
10
db/seeds.rb
Executable file
10
db/seeds.rb
Executable file
@@ -0,0 +1,10 @@
|
||||
# This file should contain all the record creation needed to seed the database with its default values.
|
||||
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
|
||||
# Major.create(:name => 'Daley', :city => cities.first)
|
||||
|
||||
User.create(:name => 'Jason Katz', :email => 'jason.katz@moonscoop.com', :password => 'admin2')
|
||||
User.create(:name => 'Patrick Coy', :email => 'patrick.coy@moonscoop.com', :password => 'admin1')
|
||||
Reference in New Issue
Block a user