TableOwner#reset can't reliably drop tables if we have dependent tables defined in a TableOwner.
e.g.
Class.new do
prepend EventSourcery::EventProcessing::TableOwner
def initialize(db_connection)
@db_connection = db_connection
end
table :authors do
primary_key :id, type: :Integer
column :uuid, 'UUID'
end
table :items do
foreign_key :authors_id, :authors
column :created_at, 'timestamp without time zone'
end
end
TableOwner#reset can't reliably drop tables if we have dependent tables defined in a TableOwner.
e.g.
Adding the
cascade
option fixes this.