mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Add paperclip for backward compatibility [SCI-3949]
This commit is contained in:
parent
f18941ea19
commit
ab395f46d0
1
Gemfile
1
Gemfile
|
@ -90,6 +90,7 @@ gem 'devise-async',
|
|||
git: 'https://github.com/mhfs/devise-async.git',
|
||||
branch: 'devise-4.x'
|
||||
gem 'image_processing', '~> 1.2'
|
||||
gem 'paperclip', '~> 6.1'
|
||||
gem 'rufus-scheduler', '~> 3.5'
|
||||
|
||||
gem 'discard', '~> 1.0'
|
||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -177,6 +177,7 @@ GEM
|
|||
activesupport
|
||||
childprocess (1.0.1)
|
||||
rake (< 13.0)
|
||||
climate_control (0.2.0)
|
||||
coderay (1.1.2)
|
||||
coffee-rails (5.0.0)
|
||||
coffee-script (>= 2.2.0)
|
||||
|
@ -373,6 +374,12 @@ GEM
|
|||
overcommit (0.49.1)
|
||||
childprocess (>= 0.6.3, < 2.0)
|
||||
iniparse (~> 1.4)
|
||||
paperclip (6.1.0)
|
||||
activemodel (>= 4.2.0)
|
||||
activesupport (>= 4.2.0)
|
||||
mime-types
|
||||
mimemagic (~> 0.3.0)
|
||||
terrapin (~> 0.6.0)
|
||||
parallel (1.17.0)
|
||||
parser (2.6.4.0)
|
||||
ast (~> 2.4.0)
|
||||
|
@ -540,6 +547,8 @@ GEM
|
|||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
stream (0.5.2)
|
||||
terrapin (0.6.0)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.9)
|
||||
|
@ -643,6 +652,7 @@ DEPENDENCIES
|
|||
omniauth-linkedin-oauth2
|
||||
omniauth-rails_csrf_protection (~> 0.1)
|
||||
overcommit
|
||||
paperclip (~> 6.1)
|
||||
pg (~> 1.1)
|
||||
pg_search
|
||||
pry
|
||||
|
|
9
db/migrate/20150713061603_add_user_columns.rb
Normal file
9
db/migrate/20150713061603_add_user_columns.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class AddUserColumns < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
add_attachment :users, :avatar
|
||||
end
|
||||
|
||||
def down
|
||||
remove_attachment :users, :avatar
|
||||
end
|
||||
end
|
|
@ -4,6 +4,7 @@ class CreateAssets < ActiveRecord::Migration[4.2]
|
|||
|
||||
t.timestamps null: false
|
||||
end
|
||||
add_attachment :assets, :file
|
||||
add_index :assets, :created_at
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,5 +5,6 @@ class CreateTempFiles < ActiveRecord::Migration[4.2]
|
|||
|
||||
t.timestamps null: false
|
||||
end
|
||||
add_attachment :temp_files, :file
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,6 +19,7 @@ class AddSearchQueryIndexes < ActiveRecord::Migration[4.2]
|
|||
add_gist_index :tags, :name
|
||||
add_gist_index :steps, :name
|
||||
add_gist_index :results, :name
|
||||
add_gist_index :assets, :file_file_name
|
||||
|
||||
# There's already semi-useless BTree index on samples
|
||||
remove_index :samples, :name
|
||||
|
@ -41,6 +42,7 @@ class AddSearchQueryIndexes < ActiveRecord::Migration[4.2]
|
|||
remove_index :tags, :name
|
||||
remove_index :steps, :name
|
||||
remove_index :results, :name
|
||||
remove_index :assets, :file_file_name
|
||||
|
||||
# Re-add semi-useless BTree index on samples
|
||||
remove_index :samples, :name
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class AddAttachmentWorkflowimgToExperiments < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
add_attachment :experiments, :workflowimg
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_attachment :experiments, :workflowimg
|
||||
end
|
||||
end
|
|
@ -4,5 +4,7 @@ class CreateZipExports < ActiveRecord::Migration[4.2]
|
|||
t.references :user, index: true, foreign_key: true
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
add_attachment :zip_exports, :zip_file
|
||||
end
|
||||
end
|
||||
|
|
|
@ -44,6 +44,9 @@ class UpdateIndexesForFasterSearch < ActiveRecord::Migration[4.2]
|
|||
if index_name_exists? :reports, :index_reports_on_description
|
||||
remove_index :reports, name: :index_reports_on_description
|
||||
end
|
||||
if index_name_exists?(:assets, :index_assets_on_file_file_name)
|
||||
remove_index :assets, name: :index_assets_on_file_file_name
|
||||
end
|
||||
if index_name_exists? :samples, :index_samples_on_name
|
||||
remove_index :samples, name: :index_samples_on_name
|
||||
end
|
||||
|
@ -112,6 +115,7 @@ class UpdateIndexesForFasterSearch < ActiveRecord::Migration[4.2]
|
|||
add_gin_index_without_tags :result_texts, :text
|
||||
add_gin_index_without_tags :reports, :name
|
||||
add_gin_index_without_tags :reports, :description
|
||||
add_gin_index_without_tags :assets, :file_file_name
|
||||
add_gin_index_without_tags :samples, :name
|
||||
add_gin_index_without_tags :sample_types, :name
|
||||
add_gin_index_without_tags :sample_groups, :name
|
||||
|
@ -147,6 +151,7 @@ class UpdateIndexesForFasterSearch < ActiveRecord::Migration[4.2]
|
|||
remove_index :result_texts, :text
|
||||
remove_index :reports, :name
|
||||
remove_index :reports, :description
|
||||
remove_index :assets, :file_file_name
|
||||
remove_index :samples, :name
|
||||
remove_index :sample_types, :name
|
||||
remove_index :sample_groups, :name
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
class AddAttachmentImageToTinyMceAssets < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :tiny_mce_assets do |t|
|
||||
t.attachment :image
|
||||
t.integer :estimated_size, default: 0, null: false
|
||||
t.references :step, index: true
|
||||
t.references :team, index: true
|
||||
|
|
Loading…
Reference in a new issue