Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# This migration comes from active_storage (originally 20170806125915)
|
||||
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :active_storage_blobs do |t|
|
||||
t.string :key, null: false
|
||||
t.string :filename, null: false
|
||||
t.string :content_type
|
||||
t.text :metadata
|
||||
t.bigint :byte_size, null: false
|
||||
t.string :checksum, null: false
|
||||
t.datetime :created_at, null: false
|
||||
|
||||
t.index [ :key ], unique: true
|
||||
end
|
||||
|
||||
create_table :active_storage_attachments do |t|
|
||||
t.string :name, null: false
|
||||
t.references :record, null: false, polymorphic: true, index: false
|
||||
t.references :blob, null: false
|
||||
|
||||
t.datetime :created_at, null: false
|
||||
|
||||
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
|
||||
end
|
||||
end
|
||||
end
|
||||
12
db/migrate/20171226201818_create_users.rb
Normal file
12
db/migrate/20171226201818_create_users.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :email, null: false
|
||||
t.string :password_digest, null: false
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
add_index :users, :email, unique: true
|
||||
end
|
||||
end
|
||||
15
db/migrate/20171231154902_create_projects.rb
Normal file
15
db/migrate/20171231154902_create_projects.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :projects do |t|
|
||||
t.string :name, null: false
|
||||
t.string :client_name
|
||||
t.string :producer_name
|
||||
t.string :producer_address
|
||||
t.text :description
|
||||
t.text :details
|
||||
t.belongs_to :user, foreign_key: true, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20180103145108_create_appearance_releases.rb
Normal file
13
db/migrate/20180103145108_create_appearance_releases.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :appearance_releases do |t|
|
||||
t.string :person_name, null: false
|
||||
t.string :person_address, null: false
|
||||
t.string :person_phone, null: false
|
||||
t.string :person_ssn
|
||||
t.belongs_to :project, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20180103154125_add_sample_to_projects.rb
Normal file
5
db/migrate/20180103154125_add_sample_to_projects.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddSampleToProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :projects, :sample, :boolean, default: false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
class AddGuardianFieldsToAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :appearance_releases, :minor, :boolean, default: false
|
||||
add_column :appearance_releases, :guardian_address, :string
|
||||
add_column :appearance_releases, :guardian_name, :string
|
||||
add_column :appearance_releases, :guardian_phone, :string
|
||||
add_column :appearance_releases, :guardian_ssn, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,43 @@
|
||||
class AddEncryptedPersonSsnToAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
add_column :appearance_releases, :encrypted_person_ssn, :string
|
||||
add_column :appearance_releases, :encrypted_person_ssn_iv, :string
|
||||
|
||||
migrate_data_up!
|
||||
|
||||
remove_column :appearance_releases, :person_ssn, :string
|
||||
end
|
||||
|
||||
def down
|
||||
add_column :appearance_releases, :person_ssn, :string
|
||||
|
||||
migrate_data_down!
|
||||
|
||||
remove_column :appearance_releases, :encrypted_person_ssn
|
||||
remove_column :appearance_releases, :encrypted_person_ssn_iv
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def migrate_data_up!
|
||||
say "Encrypting person SSNs..."
|
||||
|
||||
AppearanceRelease.find_each do |appearance_release|
|
||||
# Access the value of the attribute directly using hash syntax then use the accessor to encrypt it
|
||||
appearance_release.update!(person_ssn: appearance_release[:person_ssn])
|
||||
end
|
||||
|
||||
say "Done."
|
||||
end
|
||||
|
||||
def migrate_data_down!
|
||||
say "Decrypting person SSNs..."
|
||||
|
||||
AppearanceRelease.find_each do |appearance_release|
|
||||
appearance_release[:person_ssn] = appearance_release.person_ssn
|
||||
appearance_release.save!
|
||||
end
|
||||
|
||||
say "Done."
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddHeadshotCollectionUidToProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :projects, :headshot_collection_uid, :string
|
||||
end
|
||||
end
|
||||
9
db/migrate/20180207174905_create_videos.rb
Normal file
9
db/migrate/20180207174905_create_videos.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateVideos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :videos do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddAnalysisFieldsToVideos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :videos, :analysis_uid, :string
|
||||
add_column :videos, :analysis_status, :integer, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddIndexForAnalysisUidToVideos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_index :videos, :analysis_uid
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddNotesToAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :appearance_releases, :notes, :text
|
||||
end
|
||||
end
|
||||
6
db/migrate/20180418183903_add_team_name_to_users.rb
Normal file
6
db/migrate/20180418183903_add_team_name_to_users.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddTeamNameToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :team_name, :string
|
||||
add_index :users, :team_name, unique: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddAnalysisStartedAtToVideos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :videos, :analysis_started_at, :datetime
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class ChangeColumnNullForAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column_null(:appearance_releases, :person_address, true)
|
||||
change_column_null(:appearance_releases, :person_phone, true)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddPersonEmailToAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :appearance_releases, :person_email, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddLocaleToAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :appearance_releases, :locale, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,36 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 1)
|
||||
if ActiveRecord.gem_version >= Gem::Version.new('5.0')
|
||||
class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]; end
|
||||
else
|
||||
class ActsAsTaggableOnMigration < ActiveRecord::Migration; end
|
||||
end
|
||||
ActsAsTaggableOnMigration.class_eval do
|
||||
def self.up
|
||||
create_table :tags do |t|
|
||||
t.string :name
|
||||
end
|
||||
|
||||
create_table :taggings do |t|
|
||||
t.references :tag
|
||||
|
||||
# You should make sure that the column created is
|
||||
# long enough to store the required class names.
|
||||
t.references :taggable, polymorphic: true
|
||||
t.references :tagger, polymorphic: true
|
||||
|
||||
# Limit is created to prevent MySQL error on index
|
||||
# length for MyISAM table type: http://bit.ly/vgW2Ql
|
||||
t.string :context, limit: 128
|
||||
|
||||
t.datetime :created_at
|
||||
end
|
||||
|
||||
add_index :taggings, :tag_id
|
||||
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :taggings
|
||||
drop_table :tags
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 2)
|
||||
if ActiveRecord.gem_version >= Gem::Version.new('5.0')
|
||||
class AddMissingUniqueIndices < ActiveRecord::Migration[4.2]; end
|
||||
else
|
||||
class AddMissingUniqueIndices < ActiveRecord::Migration; end
|
||||
end
|
||||
AddMissingUniqueIndices.class_eval do
|
||||
def self.up
|
||||
add_index :tags, :name, unique: true
|
||||
|
||||
remove_index :taggings, :tag_id if index_exists?(:taggings, :tag_id)
|
||||
remove_index :taggings, [:taggable_id, :taggable_type, :context]
|
||||
add_index :taggings,
|
||||
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
|
||||
unique: true, name: 'taggings_idx'
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :tags, :name
|
||||
|
||||
remove_index :taggings, name: 'taggings_idx'
|
||||
|
||||
add_index :taggings, :tag_id unless index_exists?(:taggings, :tag_id)
|
||||
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,20 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 3)
|
||||
if ActiveRecord.gem_version >= Gem::Version.new('5.0')
|
||||
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2]; end
|
||||
else
|
||||
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration; end
|
||||
end
|
||||
AddTaggingsCounterCacheToTags.class_eval do
|
||||
def self.up
|
||||
add_column :tags, :taggings_count, :integer, default: 0
|
||||
|
||||
ActsAsTaggableOn::Tag.reset_column_information
|
||||
ActsAsTaggableOn::Tag.find_each do |tag|
|
||||
ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :tags, :taggings_count
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 4)
|
||||
if ActiveRecord.gem_version >= Gem::Version.new('5.0')
|
||||
class AddMissingTaggableIndex < ActiveRecord::Migration[4.2]; end
|
||||
else
|
||||
class AddMissingTaggableIndex < ActiveRecord::Migration; end
|
||||
end
|
||||
AddMissingTaggableIndex.class_eval do
|
||||
def self.up
|
||||
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :taggings, [:taggable_id, :taggable_type, :context]
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 5)
|
||||
# This migration is added to circumvent issue #623 and have special characters
|
||||
# work properly
|
||||
if ActiveRecord.gem_version >= Gem::Version.new('5.0')
|
||||
class ChangeCollationForTagNames < ActiveRecord::Migration[4.2]; end
|
||||
else
|
||||
class ChangeCollationForTagNames < ActiveRecord::Migration; end
|
||||
end
|
||||
ChangeCollationForTagNames.class_eval do
|
||||
def up
|
||||
if ActsAsTaggableOn::Utils.using_mysql?
|
||||
execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,23 @@
|
||||
# This migration comes from acts_as_taggable_on_engine (originally 6)
|
||||
if ActiveRecord.gem_version >= Gem::Version.new('5.0')
|
||||
class AddMissingIndexesOnTaggings < ActiveRecord::Migration[4.2]; end
|
||||
else
|
||||
class AddMissingIndexesOnTaggings < ActiveRecord::Migration; end
|
||||
end
|
||||
AddMissingIndexesOnTaggings.class_eval do
|
||||
def change
|
||||
add_index :taggings, :tag_id unless index_exists? :taggings, :tag_id
|
||||
add_index :taggings, :taggable_id unless index_exists? :taggings, :taggable_id
|
||||
add_index :taggings, :taggable_type unless index_exists? :taggings, :taggable_type
|
||||
add_index :taggings, :tagger_id unless index_exists? :taggings, :tagger_id
|
||||
add_index :taggings, :context unless index_exists? :taggings, :context
|
||||
|
||||
unless index_exists? :taggings, [:tagger_id, :tagger_type]
|
||||
add_index :taggings, [:tagger_id, :tagger_type]
|
||||
end
|
||||
|
||||
unless index_exists? :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
|
||||
add_index :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
class CreateVideoAppearanceConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :video_appearance_confirmations do |t|
|
||||
t.belongs_to :video, foreign_key: true
|
||||
t.belongs_to :appearance_release, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20180803012622_create_bookmarks.rb
Normal file
10
db/migrate/20180803012622_create_bookmarks.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateBookmarks < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :bookmarks do |t|
|
||||
t.belongs_to :video, foreign_key: true
|
||||
t.string :time_elapsed
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20180808193510_create_unreleased_appearances.rb
Normal file
10
db/migrate/20180808193510_create_unreleased_appearances.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateUnreleasedAppearances < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :unreleased_appearances do |t|
|
||||
t.belongs_to :video, foreign_key: true
|
||||
t.string :time_elapsed
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
17
db/migrate/20181022134900_create_area_releases.rb
Normal file
17
db/migrate/20181022134900_create_area_releases.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class CreateAreaReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :area_releases do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
t.string :name
|
||||
t.string :address_street1
|
||||
t.string :address_street2
|
||||
t.string :address_city
|
||||
t.string :address_state
|
||||
t.string :address_zip
|
||||
t.string :address_country
|
||||
t.text :notes
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddTimeElapsedToVideoAppearanceConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :video_appearance_confirmations, :time_elapsed, :string
|
||||
end
|
||||
end
|
||||
28
db/migrate/20181030213548_create_location_releases.rb
Normal file
28
db/migrate/20181030213548_create_location_releases.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
class CreateLocationReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :location_releases do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
t.string :name
|
||||
t.string :address_street1
|
||||
t.string :address_street2
|
||||
t.string :address_city
|
||||
t.string :address_state
|
||||
t.string :address_zip
|
||||
t.string :address_country
|
||||
t.string :person_name
|
||||
t.string :person_address_street1
|
||||
t.string :person_address_street2
|
||||
t.string :person_address_city
|
||||
t.string :person_address_state
|
||||
t.string :person_address_zip
|
||||
t.string :person_address_country
|
||||
t.string :person_phone
|
||||
t.string :person_email
|
||||
t.string :person_title
|
||||
t.string :person_company
|
||||
t.text :notes
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
22
db/migrate/20181101184834_create_material_releases.rb
Normal file
22
db/migrate/20181101184834_create_material_releases.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
class CreateMaterialReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :material_releases do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
t.string :name
|
||||
t.string :person_name
|
||||
t.string :person_address_street1
|
||||
t.string :person_address_street2
|
||||
t.string :person_address_city
|
||||
t.string :person_address_state
|
||||
t.string :person_address_zip
|
||||
t.string :person_address_country
|
||||
t.string :person_phone
|
||||
t.string :person_email
|
||||
t.string :person_title
|
||||
t.string :person_company
|
||||
t.text :notes
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class RenameVideoAppearanceConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
rename_table :video_appearance_confirmations, :video_release_confirmations
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
class MakeVideoReleaseConfirmationsPolymorphic < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_foreign_key :video_release_confirmations, :appearance_releases
|
||||
rename_column :video_release_confirmations, :appearance_release_id, :releasable_id
|
||||
add_column :video_release_confirmations, :releasable_type, :string, after: :releasable_id
|
||||
add_index :video_release_confirmations, [:releasable_id, :releasable_type], name: "index_video_release_confirmations_on_releasable_id_and_type"
|
||||
end
|
||||
end
|
||||
5
db/migrate/20181113200008_add_notes_to_bookmarks.rb
Normal file
5
db/migrate/20181113200008_add_notes_to_bookmarks.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddNotesToBookmarks < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :bookmarks, :notes, :text
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddNotesToUnreleasedAppearances < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :unreleased_appearances, :notes, :text
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddTaggingStatusToAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :appearance_releases, :tagging_status, :integer, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddTaggingStatusToLocationReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :location_releases, :tagging_status, :integer, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddTaggingStatusToMaterialReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :material_releases, :tagging_status, :integer, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddTaggingStatusToAreaReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :area_releases, :tagging_status, :integer, default: 0
|
||||
end
|
||||
end
|
||||
11
db/migrate/20181123211217_install_pg_contrib_packages.rb
Normal file
11
db/migrate/20181123211217_install_pg_contrib_packages.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class InstallPgContribPackages < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
execute "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
|
||||
execute "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;"
|
||||
end
|
||||
|
||||
def down
|
||||
execute "DROP EXTENSION pg_trgm;"
|
||||
execute "DROP EXTENSION fuzzystrmatch;"
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
class AddPgSearchDmetaphoneSupportFunctions < ActiveRecord::Migration[5.2]
|
||||
def self.up
|
||||
say_with_time("Adding support functions for pg_search :dmetaphone") do
|
||||
execute <<-'SQL'
|
||||
CREATE OR REPLACE FUNCTION pg_search_dmetaphone(text) RETURNS text LANGUAGE SQL IMMUTABLE STRICT AS $function$
|
||||
SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(regexp_split_to_array($1, E'\\s+')))), ' ')
|
||||
$function$;
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
say_with_time("Dropping support functions for pg_search :dmetaphone") do
|
||||
execute <<-'SQL'
|
||||
DROP FUNCTION pg_search_dmetaphone(text);
|
||||
SQL
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20181129215157_create_imports.rb
Normal file
10
db/migrate/20181129215157_create_imports.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateImports < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :imports do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
t.integer :status, default: 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20181205193134_add_releasable_to_imports.rb
Normal file
5
db/migrate/20181205193134_add_releasable_to_imports.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddReleasableToImports < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :imports, :releasable, polymorphic: true
|
||||
end
|
||||
end
|
||||
13
db/migrate/20181208001821_create_contract_templates.rb
Normal file
13
db/migrate/20181208001821_create_contract_templates.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateContractTemplates < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :contract_templates do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
t.string :name
|
||||
t.text :body
|
||||
t.text :guardian_clause
|
||||
t.monetize :fee
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddContractTemplateToAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :appearance_releases, :contract_template, foreign_key: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
# This migration comes from action_text (originally 201805281641)
|
||||
class CreateActionTextTables < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :action_text_rich_texts do |t|
|
||||
t.string :name, null: false
|
||||
t.text :body, limit: 16777215
|
||||
t.references :record, null: false, polymorphic: true, index: false
|
||||
|
||||
t.datetime :created_at, null: false
|
||||
t.datetime :updated_at, null: false
|
||||
|
||||
t.index [ :record_type, :record_id, :name ], name: "index_action_text_rich_texts_uniqueness", unique: true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddLocaleToLocationReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :location_releases, :locale, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddContractTemplateToLocationReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :location_releases, :contract_template, foreign_key: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddReleaseTypeToContractTemplates < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :contract_templates, :release_type, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddContractTemplateToMaterialReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :material_releases, :contract_template, foreign_key: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddLocaleToMaterialReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :material_releases, :locale, :string
|
||||
end
|
||||
end
|
||||
5
db/migrate/20190111211317_add_locale_to_area_releases.rb
Normal file
5
db/migrate/20190111211317_add_locale_to_area_releases.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddLocaleToAreaReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :area_releases, :locale, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddContractTemplateToAreaReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :area_releases, :contract_template, foreign_key: true
|
||||
end
|
||||
end
|
||||
5
db/migrate/20190125012705_add_admin_to_users.rb
Normal file
5
db/migrate/20190125012705_add_admin_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddAdminToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :admin, :boolean, default: false
|
||||
end
|
||||
end
|
||||
5
db/migrate/20190129192226_add_plan_uid_to_users.rb
Normal file
5
db/migrate/20190129192226_add_plan_uid_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddPlanUidToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :plan_uid, :string
|
||||
end
|
||||
end
|
||||
12
db/migrate/20190204054833_create_accounts.rb
Normal file
12
db/migrate/20190204054833_create_accounts.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateAccounts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :accounts do |t|
|
||||
t.string :name
|
||||
t.string :slug
|
||||
t.string :plan_uid
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :accounts, :slug, unique: true
|
||||
end
|
||||
end
|
||||
47
db/migrate/20190204060502_add_account_to_users.rb
Normal file
47
db/migrate/20190204060502_add_account_to_users.rb
Normal file
@@ -0,0 +1,47 @@
|
||||
class AddAccountToUsers < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
add_reference :users, :account, foreign_key: true
|
||||
migrate_data_up
|
||||
remove_column :users, :team_name, :string
|
||||
end
|
||||
|
||||
def down
|
||||
add_column :users, :team_name, :string
|
||||
migrate_user_data_down
|
||||
|
||||
remove_reference :users, :account
|
||||
migrate_account_data_down
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def migrate_data_up
|
||||
say "Creating Accounts.."
|
||||
|
||||
User.find_each do |user|
|
||||
account = Account.new(name: user.team_name.titleize, slug: user.team_name)
|
||||
user.update!(account: account)
|
||||
end
|
||||
|
||||
say "Done."
|
||||
end
|
||||
|
||||
def migrate_user_data_down
|
||||
say "Updating Users.."
|
||||
|
||||
User.find_each do |user|
|
||||
user.update!(team_name: user.account.slug)
|
||||
end
|
||||
|
||||
say "Done."
|
||||
end
|
||||
|
||||
def migrate_account_data_down
|
||||
say "Destroying Accounts.."
|
||||
|
||||
Account.delete_all
|
||||
|
||||
say "Done."
|
||||
end
|
||||
|
||||
end
|
||||
42
db/migrate/20190204063948_add_account_to_projects.rb
Normal file
42
db/migrate/20190204063948_add_account_to_projects.rb
Normal file
@@ -0,0 +1,42 @@
|
||||
class AddAccountToProjects < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
add_reference :projects, :account, foreign_key: true
|
||||
migrate_data_up
|
||||
remove_reference :projects, :user
|
||||
end
|
||||
|
||||
def down
|
||||
add_reference :projects, :user, foreign_key: true
|
||||
migrate_data_down
|
||||
remove_reference :projects, :account
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
class Project < ActiveRecord::Base
|
||||
belongs_to :account
|
||||
belongs_to :user
|
||||
end
|
||||
|
||||
def migrate_data_up
|
||||
say "Setting Project#account.."
|
||||
|
||||
Project.reset_column_information
|
||||
Project.find_each do |project|
|
||||
project.update!(account: project.user.account)
|
||||
end
|
||||
|
||||
say "Done."
|
||||
end
|
||||
|
||||
def migrate_data_down
|
||||
say "Setting Project#user.."
|
||||
|
||||
Project.reset_column_information
|
||||
Project.find_each do |project|
|
||||
project.update!(user: project.account.users.first)
|
||||
end
|
||||
|
||||
say "Done."
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddPasswordResetTokenToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :password_reset_token, :string
|
||||
add_index :users, :password_reset_token, unique: true
|
||||
end
|
||||
end
|
||||
35
db/migrate/20190509201711_create_talent_releases.rb
Normal file
35
db/migrate/20190509201711_create_talent_releases.rb
Normal file
@@ -0,0 +1,35 @@
|
||||
class CreateTalentReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :talent_releases do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
t.belongs_to :contract_template, foreign_key: true
|
||||
t.string :person_name
|
||||
t.string :person_address_street1
|
||||
t.string :person_address_street2
|
||||
t.string :person_address_city
|
||||
t.string :person_address_state
|
||||
t.string :person_address_zip
|
||||
t.string :person_address_country
|
||||
t.string :person_phone
|
||||
t.string :person_email
|
||||
t.string :encrypted_person_ssn
|
||||
t.string :encrypted_person_ssn_iv
|
||||
t.string :guardian_name
|
||||
t.string :guardian_address_street1
|
||||
t.string :guardian_address_street2
|
||||
t.string :guardian_address_city
|
||||
t.string :guardian_address_state
|
||||
t.string :guardian_address_zip
|
||||
t.string :guardian_address_country
|
||||
t.string :guardian_phone
|
||||
t.string :guardian_email
|
||||
t.string :encrypted_guardian_ssn
|
||||
t.string :encrypted_guardian_ssn_iv
|
||||
t.boolean :minor, default: false
|
||||
t.string :locale
|
||||
t.text :notes
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddTaggingStatusToTalentReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :talent_releases, :tagging_status, :integer, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddNameAndNumberToVideos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :videos, :name, :string
|
||||
add_column :videos, :number, :string
|
||||
end
|
||||
end
|
||||
25
db/migrate/20190515233909_create_acquired_media_releases.rb
Normal file
25
db/migrate/20190515233909_create_acquired_media_releases.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
class CreateAcquiredMediaReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :acquired_media_releases do |t|
|
||||
t.references :project, foreign_key: true
|
||||
t.references :contract_template, foreign_key: true
|
||||
t.string :locale
|
||||
t.text :notes
|
||||
t.integer :tagging_status, default: 0
|
||||
t.string :name
|
||||
t.string :person_name
|
||||
t.string :person_address_street1
|
||||
t.string :person_address_street2
|
||||
t.string :person_address_city
|
||||
t.string :person_address_state
|
||||
t.string :person_address_zip
|
||||
t.string :person_address_country
|
||||
t.string :person_phone
|
||||
t.string :person_email
|
||||
t.string :person_title
|
||||
t.string :person_company
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
25
db/migrate/20190517224239_create_music_releases.rb
Normal file
25
db/migrate/20190517224239_create_music_releases.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
class CreateMusicReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :music_releases do |t|
|
||||
t.belongs_to :project, foreign_key: true
|
||||
t.belongs_to :contract_template, foreign_key: true
|
||||
t.string :locale
|
||||
t.text :notes
|
||||
t.integer :tagging_status, default: 0
|
||||
t.string :name
|
||||
t.string :person_name
|
||||
t.string :person_address_street1
|
||||
t.string :person_address_street2
|
||||
t.string :person_address_city
|
||||
t.string :person_address_state
|
||||
t.string :person_address_zip
|
||||
t.string :person_address_country
|
||||
t.string :person_phone
|
||||
t.string :person_email
|
||||
t.string :person_title
|
||||
t.string :person_company
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
21
db/migrate/20190524220130_rails_settings_migration.rb
Normal file
21
db/migrate/20190524220130_rails_settings_migration.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
MIGRATION_BASE_CLASS = if ActiveRecord::VERSION::MAJOR >= 5
|
||||
ActiveRecord::Migration[5.0]
|
||||
else
|
||||
ActiveRecord::Migration
|
||||
end
|
||||
|
||||
class RailsSettingsMigration < MIGRATION_BASE_CLASS
|
||||
def self.up
|
||||
create_table :settings do |t|
|
||||
t.string :var, :null => false
|
||||
t.text :value
|
||||
t.references :target, :null => false, :polymorphic => true
|
||||
t.timestamps :null => true
|
||||
end
|
||||
add_index :settings, [ :target_type, :target_id, :var ], :unique => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :settings
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddParentIdToContractTemplates < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :contract_templates, :parent_id, :integer
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddReportPublishedAtToVideos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :videos, :report_published_at, :datetime
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddCollectionUidToAcquiredMediaReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :acquired_media_releases, :collection_uid, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddAdditionalInfoToVideoReleaseConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :video_release_confirmations, :additional_info, :text
|
||||
end
|
||||
end
|
||||
11
db/migrate/20190613155257_create_graphics_elements_table.rb
Normal file
11
db/migrate/20190613155257_create_graphics_elements_table.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateGraphicsElementsTable < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :graphics_elements do |t|
|
||||
t.references :video, foreign_key: true
|
||||
t.text :text
|
||||
t.string :time_elapsed
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddAdditionalInfoToGraphicsElements < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :graphics_elements, :additional_info, :text
|
||||
end
|
||||
end
|
||||
12
db/migrate/20190702221718_create_file_infos.rb
Normal file
12
db/migrate/20190702221718_create_file_infos.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateFileInfos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :file_infos do |t|
|
||||
t.belongs_to :acquired_media_release, foreign_key: true
|
||||
t.string :filename, null: false
|
||||
t.string :content_type
|
||||
t.integer :byte_size
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddFileInfoToVideoReleaseConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :video_release_confirmations, :file_info, foreign_key: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddTerritoryAndTermToAcquiredMediaRelease < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :acquired_media_releases, :territory, :string
|
||||
add_column :acquired_media_releases, :term, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class ConvertFileInfosByteSizeToBigint < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column :file_infos, :byte_size, :bigint
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
class ConvertAdditionalInfoHashToColumnsForVideoReleaseConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :video_release_confirmations, :timecode_in, :string
|
||||
add_column :video_release_confirmations, :timecode_out, :string
|
||||
add_column :video_release_confirmations, :duration, :string
|
||||
add_column :video_release_confirmations, :source_file_name, :string
|
||||
add_column :video_release_confirmations, :clip_name, :string
|
||||
add_column :video_release_confirmations, :description, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
class ConvertAdditionalInfoHashToColumnsForGraphicsElements < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :graphics_elements, :timecode_in, :string
|
||||
add_column :graphics_elements, :timecode_out, :string
|
||||
add_column :graphics_elements, :duration, :string
|
||||
add_column :graphics_elements, :source_file_name, :string
|
||||
add_column :graphics_elements, :clip_name, :string
|
||||
add_column :graphics_elements, :description, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
class AddEdlAttributesToUnreleasedAppearances < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :unreleased_appearances, :timecode_in, :string
|
||||
add_column :unreleased_appearances, :timecode_out, :string
|
||||
add_column :unreleased_appearances, :duration, :string
|
||||
add_column :unreleased_appearances, :source_file_name, :string
|
||||
add_column :unreleased_appearances, :clip_name, :string
|
||||
add_column :unreleased_appearances, :description, :string
|
||||
end
|
||||
end
|
||||
5
db/migrate/20190719210405_drop_area_releases.rb
Normal file
5
db/migrate/20190719210405_drop_area_releases.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class DropAreaReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
drop_table :area_releases
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
class RemoveSsnFieldsFromTalentAndAppearanceReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_column :talent_releases, :encrypted_person_ssn, :string
|
||||
remove_column :talent_releases, :encrypted_person_ssn_iv, :string
|
||||
remove_column :talent_releases, :encrypted_guardian_ssn, :string
|
||||
remove_column :talent_releases, :encrypted_guardian_ssn_iv, :string
|
||||
|
||||
remove_column :appearance_releases, :encrypted_person_ssn, :string
|
||||
remove_column :appearance_releases, :encrypted_person_ssn_iv, :string
|
||||
remove_column :appearance_releases, :guardian_ssn, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddEdlStartTimecodeToVideos < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :videos, :edl_start_timecode, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class RenameEdlStartTimecodeToEdlTimecodeStart < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
rename_column :videos, :edl_start_timecode, :edl_timecode_start
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddEdlTypeToGraphicsElements < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :graphics_elements, :edl_type, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
class ConvertFileInfosToBePolymorphic < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_foreign_key :file_infos, :acquired_media_releases
|
||||
rename_column :file_infos, :acquired_media_release_id, :releasable_id
|
||||
add_column :file_infos, :releasable_type, :string, after: :releasable_id
|
||||
add_index :file_infos, [:releasable_id, :releasable_type], name: "index_file_infos_on_releasable_id_and_type"
|
||||
end
|
||||
end
|
||||
12
db/migrate/20190809133049_create_composers.rb
Normal file
12
db/migrate/20190809133049_create_composers.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateComposers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :composers do |t|
|
||||
t.belongs_to :music_release, foreign_key: true
|
||||
t.string :name, null: false
|
||||
t.string :affiliation, null: false
|
||||
t.float :percentage, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
12
db/migrate/20190809133100_create_publishers.rb
Normal file
12
db/migrate/20190809133100_create_publishers.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreatePublishers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :publishers do |t|
|
||||
t.belongs_to :music_release, foreign_key: true
|
||||
t.string :name, null: false
|
||||
t.string :affiliation, null: false
|
||||
t.float :percentage, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddMusicTypeAndMusicCategoryToVideoReleaseConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :video_release_confirmations, :music_type, :string
|
||||
add_column :video_release_confirmations, :music_category, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
class AddChannelToVideoReleaseConfirmationsGraphicsElementsAndUnreleasedAppearances < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :video_release_confirmations, :channel, :string
|
||||
add_column :graphics_elements, :channel, :string
|
||||
add_column :unreleased_appearances, :channel, :string
|
||||
end
|
||||
end
|
||||
23
db/migrate/20190821231050_create_audio_confirmations.rb
Normal file
23
db/migrate/20190821231050_create_audio_confirmations.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
class CreateAudioConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :audio_confirmations do |t|
|
||||
t.references :video, foreign_key: true
|
||||
t.string :channel
|
||||
t.string :timecode_in
|
||||
t.string :timecode_out
|
||||
t.string :duration
|
||||
t.string :source_file_name
|
||||
t.string :clip_name
|
||||
t.string :description
|
||||
t.string :time_elapsed
|
||||
t.string :music_type
|
||||
t.string :music_category
|
||||
t.string :composer_info
|
||||
t.string :publisher_info
|
||||
t.string :catalog
|
||||
t.string :title
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class DropAdditionalInfoFromGraphicsElementsVideoReleaseConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_column :graphics_elements, :additional_info, :text
|
||||
remove_column :video_release_confirmations, :additional_info, :text
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class RemoveMusicColumnsFromVideoReleaseConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_column :video_release_confirmations, :music_type, :string
|
||||
remove_column :video_release_confirmations, :music_category, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddConfirmationTypeToAudioConfirmations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :audio_confirmations, :confirmation_type, :string, null: false, default: "original_music"
|
||||
end
|
||||
end
|
||||
5
db/migrate/20190823214942_remove_plan_uid_from_users.rb
Normal file
5
db/migrate/20190823214942_remove_plan_uid_from_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class RemovePlanUidFromUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_column :users, :plan_uid, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
# This migration comes from active_storage (originally 20180723000244)
|
||||
class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
return if foreign_key_exists?(:active_storage_attachments, column: :blob_id)
|
||||
|
||||
if table_exists?(:active_storage_blobs)
|
||||
add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20190911174324_add_role_to_users.rb
Normal file
5
db/migrate/20190911174324_add_role_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddRoleToUsers < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :users, :role, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddEdlTypeToAudioConfirmations < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :audio_confirmations, :edl_type, :string, default: "all_tracks", null: false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddVideoEditingSystemToVideos < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :videos, :video_editing_system, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddRememberCreatedAtToUsers < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :users, :remember_created_at, :datetime
|
||||
end
|
||||
end
|
||||
5
db/migrate/20190927164725_add_cae_number_to_composers.rb
Normal file
5
db/migrate/20190927164725_add_cae_number_to_composers.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddCaeNumberToComposers < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :composers, :cae_number, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddNoteCategoryToUnreleasedAppearance < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :unreleased_appearances, :note_category, :integer, null: false, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddGraphicTypeToGraphicsElements < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :graphics_elements, :graphic_type, :string
|
||||
end
|
||||
end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user