Skip to content

Commit

Permalink
Use correct model name for Dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmcarthur committed Jan 10, 2024
1 parent 8a6a115 commit 139a9c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/initializers/sign_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
deployed = !Rails.env.development? && !Rails.env.test?

begin
Rake::Task["dictionary:update"].execute if deployed
Rake::Task['dictionary:update'].execute if deployed
rescue StandardError => e
warn e
end
Expand All @@ -14,8 +14,8 @@
# we can use common queries and ordering.
# There's no ADD COLUMN IF NOT EXISTS, so we just handle the error
begin
DictionarySign.connection.execute("ALTER TABLE words ADD COLUMN word text AS (gloss)")
Signbank::Sign.connection.execute('ALTER TABLE words ADD COLUMN word text AS (gloss)')
rescue ActiveRecord::StatementInvalid => e
raise e unless e.message == "SQLite3::SQLException: duplicate column name: word"
raise e unless e.message == 'SQLite3::SQLException: duplicate column name: word'
end
end

0 comments on commit 139a9c2

Please sign in to comment.