Skip to content

Commit

Permalink
update dummy migration files
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Apr 26, 2015
1 parent bdb8ea2 commit 8374438
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: ruby
cache: bundler
rvm:
- 2.1.5
- 2.2.1
- 2.2.2
before_script:
- mysql -e 'create database enju_test'
- psql -c 'create database enju_test;' -U postgres
Expand Down
4 changes: 2 additions & 2 deletions enju_loc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Gem::Specification.new do |s|
s.add_development_dependency "rspec-rails", "~> 3.2"
s.add_development_dependency "vcr"
s.add_development_dependency "webmock"
#s.add_development_dependency "enju_leaf", "~> 1.1.0.rc16"
#s.add_development_dependency "enju_subject", "~> 0.1.0.pre28"
#s.add_development_dependency "enju_leaf", "~> 1.2.0.beta.1"
#s.add_development_dependency "enju_subject", "~> 0.2.0.beta.1"
s.add_development_dependency "sunspot_solr", "~> 2.2"
s.add_development_dependency "simplecov"
s.add_development_dependency "redis-rails"
Expand Down
2 changes: 1 addition & 1 deletion lib/enju_loc/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module EnjuLoc
VERSION = "0.2.0.pre1"
VERSION = "0.2.0.beta.1"
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def change
t.integer :user_id
t.text :note
t.datetime :executed_at
t.string :agent_import_file_name
t.string :agent_import_filename
t.string :agent_import_content_type
t.integer :agent_import_file_size
t.datetime :agent_import_updated_at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def change
t.integer :user_id
t.text :note
t.datetime :executed_at
t.string :resource_import_file_name
t.string :resource_import_filename
t.string :resource_import_content_type
t.integer :resource_import_file_size
t.datetime :resource_import_updated_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class AddAttachmentsPictureToPictureFile < ActiveRecord::Migration
def self.up
add_column :picture_files, :picture_file_name, :string
add_column :picture_files, :picture_filename, :string
add_column :picture_files, :picture_content_type, :string
add_column :picture_files, :picture_file_size, :integer
add_column :picture_files, :picture_updated_at, :datetime
end

def self.down
remove_column :picture_files, :picture_file_name
remove_column :picture_files, :picture_filename
remove_column :picture_files, :picture_content_type
remove_column :picture_files, :picture_file_size
remove_column :picture_files, :picture_updated_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class AddAttachmentsAttachmentToManifestation < ActiveRecord::Migration
def self.up
add_column :manifestations, :attachment_file_name, :string
add_column :manifestations, :attachment_filename, :string
add_column :manifestations, :attachment_content_type, :string
add_column :manifestations, :attachment_file_size, :integer
add_column :manifestations, :attachment_updated_at, :datetime
end

def self.down
remove_column :manifestations, :attachment_file_name
remove_column :manifestations, :attachment_filename
remove_column :manifestations, :attachment_content_type
remove_column :manifestations, :attachment_file_size
remove_column :manifestations, :attachment_updated_at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def change
t.integer :user_id
t.text :note
t.datetime :executed_at
t.string :user_import_file_name
t.string :user_import_filename
t.string :user_import_content_type
t.string :user_import_file_size
t.datetime :user_import_updated_at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ class CreateResourceExportFiles < ActiveRecord::Migration
def change
create_table :resource_export_files do |t|
t.integer :user_id
t.attachment :resource_export
t.datetime :executed_at

t.timestamps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ class CreateUserExportFiles < ActiveRecord::Migration
def change
create_table :user_export_files do |t|
t.integer :user_id
t.attachment :user_export
t.datetime :executed_at

t.timestamps
Expand Down
14 changes: 14 additions & 0 deletions spec/dummy/db/migrate/20140821151023_create_colors.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class CreateColors < ActiveRecord::Migration
def change
create_table :colors do |t|
t.integer :library_group_id
t.string :property
t.string :code
t.integer :position

t.timestamps
end

add_index :colors, :library_group_id
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddForeignKeyToShelvesReferencingLibraries < ActiveRecord::Migration
def change
add_foreign_key :shelves, :libraries
add_foreign_key :items, :shelves
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddSettingsToLibraryGroup < ActiveRecord::Migration
def change
add_column :library_groups, :settings, :text
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class AddUserExportIdToUserExportFile < ActiveRecord::Migration
def change
add_column :user_export_files, :user_export_id, :string
add_column :user_export_files, :user_export_size, :integer
add_column :user_export_files, :user_import_filename, :string
add_index :user_export_files, :user_export_id
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class AddResourceExportIdToResourceExportFile < ActiveRecord::Migration
def change
add_column :resource_export_files, :resource_export_id, :string
add_column :resource_export_files, :resource_export_size, :integer
add_column :resource_export_files, :resource_export_filename, :string
add_index :resource_export_files, :resource_export_id
end
end
42 changes: 28 additions & 14 deletions spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20141003182825) do
ActiveRecord::Schema.define(version: 20150305030046) do

create_table "accepts", force: :cascade do |t|
t.integer "basket_id"
Expand Down Expand Up @@ -43,7 +43,7 @@
t.integer "user_id"
t.text "note"
t.datetime "executed_at"
t.string "agent_import_file_name"
t.string "agent_import_filename"
t.string "agent_import_content_type"
t.integer "agent_import_file_size"
t.datetime "agent_import_updated_at"
Expand Down Expand Up @@ -234,6 +234,17 @@
add_index "classifications", ["manifestation_id"], name: "index_classifications_on_manifestation_id"
add_index "classifications", ["parent_id"], name: "index_classifications_on_parent_id"

create_table "colors", force: :cascade do |t|
t.integer "library_group_id"
t.string "property"
t.string "code"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
end

add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"

create_table "content_types", force: :cascade do |t|
t.string "name", null: false
t.text "display_name"
Expand Down Expand Up @@ -462,6 +473,7 @@
t.datetime "updated_at"
t.text "admin_networks"
t.string "url", default: "http://localhost:3000/"
t.text "settings"
end

add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
Expand Down Expand Up @@ -528,7 +540,7 @@
t.integer "required_score", default: 0, null: false
t.integer "frequency_id", default: 1, null: false
t.boolean "subscription_master", default: false, null: false
t.string "attachment_file_name"
t.string "attachment_filename"
t.string "attachment_content_type"
t.integer "attachment_file_size"
t.datetime "attachment_updated_at"
Expand Down Expand Up @@ -592,7 +604,7 @@
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.string "picture_file_name"
t.string "picture_filename"
t.string "picture_content_type"
t.integer "picture_file_size"
t.datetime "picture_updated_at"
Expand Down Expand Up @@ -696,15 +708,16 @@

create_table "resource_export_files", force: :cascade do |t|
t.integer "user_id"
t.string "resource_export_file_name"
t.string "resource_export_content_type"
t.integer "resource_export_file_size"
t.datetime "resource_export_updated_at"
t.datetime "executed_at"
t.datetime "created_at"
t.datetime "updated_at"
t.string "resource_export_id"
t.integer "resource_export_size"
t.string "resource_export_filename"
end

add_index "resource_export_files", ["resource_export_id"], name: "index_resource_export_files_on_resource_export_id"

create_table "resource_import_file_transitions", force: :cascade do |t|
t.string "to_state"
t.text "metadata", default: "{}"
Expand All @@ -724,7 +737,7 @@
t.integer "user_id"
t.text "note"
t.datetime "executed_at"
t.string "resource_import_file_name"
t.string "resource_import_filename"
t.string "resource_import_content_type"
t.integer "resource_import_file_size"
t.datetime "resource_import_updated_at"
Expand Down Expand Up @@ -917,15 +930,16 @@

create_table "user_export_files", force: :cascade do |t|
t.integer "user_id"
t.string "user_export_file_name"
t.string "user_export_content_type"
t.integer "user_export_file_size"
t.datetime "user_export_updated_at"
t.datetime "executed_at"
t.datetime "created_at"
t.datetime "updated_at"
t.string "user_export_id"
t.integer "user_export_size"
t.string "user_import_filename"
end

add_index "user_export_files", ["user_export_id"], name: "index_user_export_files_on_user_export_id"

create_table "user_groups", force: :cascade do |t|
t.string "name"
t.text "display_name"
Expand Down Expand Up @@ -964,7 +978,7 @@
t.integer "user_id"
t.text "note"
t.datetime "executed_at"
t.string "user_import_file_name"
t.string "user_import_filename"
t.string "user_import_content_type"
t.string "user_import_file_size"
t.datetime "user_import_updated_at"
Expand Down

0 comments on commit 8374438

Please sign in to comment.