Skip to content

Commit

Permalink
Accept no table case in recovery
Browse files Browse the repository at this point in the history
GitHub: fix #73

Reported by Masatoshi TSUCHIYA. Thanks!!!
  • Loading branch information
kou committed Nov 11, 2019
1 parent b77a7fd commit cc086ac
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/migrate/20170630063657_create_searcher_records.rb
Expand Up @@ -2,6 +2,8 @@

class CreateSearcherRecords < ActiveRecord::Migration[4.2]
def change
return if reverting? and !table_exists?(:searcher_records)

if Redmine::Database.mysql?
options = "ENGINE=Mroonga"
else
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20170810045914_create_issue_contents.rb
Expand Up @@ -2,6 +2,8 @@

class CreateIssueContents < ActiveRecord::Migration[4.2]
def change
return if reverting? and !table_exists?(:issue_contents)

options = nil
contents_limit = nil
if Redmine::Database.mysql?
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20190603060948_create_fts_types.rb
@@ -1,5 +1,7 @@
class CreateFtsTypes < ActiveRecord::Migration[5.2]
def change
return if reverting? and !table_exists?(:fts_types)

create_table :fts_types do |t|
t.string :name, null: false
t.index :name, unique: true
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20190603061110_create_fts_tag_types.rb
@@ -1,5 +1,7 @@
class CreateFtsTagTypes < ActiveRecord::Migration[5.2]
def change
return if reverting? and !table_exists?(:fts_tag_types)

create_table :fts_tag_types do |t|
t.string :name, null: false
t.index :name, unique: true
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20190603061445_create_fts_tags.rb
@@ -1,5 +1,7 @@
class CreateFtsTags < ActiveRecord::Migration[5.2]
def change
return if reverting? and !table_exists?(:fts_tags)

if Redmine::Database.mysql?
options = "ENGINE=Mroonga"
else
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20190603061606_create_fts_targets.rb
Expand Up @@ -6,6 +6,8 @@ def comparable_version(version)
end

def change
return if reverting? and !table_exists?(:fts_targets)

if Redmine::Database.mysql?
mroonga_version = connection.select_rows(<<-SQL)[0][1]
SHOW VARIABLES LIKE 'mroonga_version';
Expand Down
@@ -1,5 +1,7 @@
class MroongaAddSourceTypeIdIndexToFtsTargets < ActiveRecord::Migration[5.2]
def change
return if reverting? and !table_exists?(:fts_targets)

if Redmine::Database.mysql?
add_index :fts_targets, :source_type_id
end
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20190807085000_create_fts_query_expansions.rb
@@ -1,5 +1,7 @@
class CreateFtsQueryExpansions < ActiveRecord::Migration[5.2]
def change
return if reverting? and !table_exists?(:fts_query_expansions)

if Redmine::Database.mysql?
options = "ENGINE=Mroonga"
else
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20190925074645_add_name_index_to_fts_tags.rb
@@ -1,5 +1,7 @@
class AddNameIndexToFtsTags < ActiveRecord::Migration[5.2]
def change
return if reverting? and !table_exists?(:fts_tags)

if Redmine::Database.mysql?
add_index :fts_tags,
:name,
Expand Down

0 comments on commit cc086ac

Please sign in to comment.