Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions card/mod/core/data/schema/20251110200407_remove_legacy_tables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

class RemoveLegacyTables < Cardio::Migration::Schema
def up
drop_table :card_revisions
drop_table :users
drop_table :sessions
remove_column :cards, :current_revision_id
remove_column :cards, :references_expired
drop_table :card_revisions, if_exists: true
drop_table :users, if_exists: true
drop_table :sessions, if_exists: true
remove_column_with_rescue :cards, :current_revision_id
remove_column_with_rescue :cards, :references_expired
end

def remove_column_with_rescue *args
remove_column *args
rescue StandardError
puts "failed to remove column #{args}"
end
end
2 changes: 1 addition & 1 deletion card/mod/core/lib/tasks/card/trash.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace :card do
namespace :trash do
desc "empty trash"
task :empty do
task empty: :environment do
Cardio::Utils.empty_trash
end
end
Expand Down
4 changes: 2 additions & 2 deletions docker/template/config/database.yml.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
production:
production: &production
host: db
database: deckdb
username: <%= username %>
password: deckodbpass

adapter: <%= adapter %>
encoding: utf8
reconnect: false
pool: 5
development: *production