Initial Commit
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user