Class: Fides::PostgresqlWriter

Inherits:
Object
  • Object
show all
Includes:
SqlWriter
Defined in:
lib/fides/postgresql_writer.rb

Class Method Summary collapse

Methods included from SqlWriter

included

Class Method Details

.executable_add_statements(interface_name, models, polymorphic_model) ⇒ Object



6
7
8
9
10
# File 'lib/fides/postgresql_writer.rb', line 6

def self.executable_add_statements(interface_name, models, polymorphic_model)
  sql = create_and_update_constraint_sql(interface_name, models, polymorphic_model)
  sql << delete_constraint_sql(interface_name, models, polymorphic_model)
  return [sql]
end

.executable_remove_statements(interface_name) ⇒ Object



12
13
14
# File 'lib/fides/postgresql_writer.rb', line 12

def self.executable_remove_statements(interface_name)
  [drop_constraints_sql(interface_name)]
end