Module: SchemaPlus::Tables::Sql
- Defined in:
- lib/schema_plus/tables/sql.rb
Class Method Summary collapse
Class Method Details
.drop_table(env, support_temporary:, support_cascade:) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/schema_plus/tables/sql.rb', line 4 def self.drop_table(env, support_temporary:, support_cascade:) sql = "DROP" sql += ' TEMPORARY' if env.[:temporary] and support_temporary sql += " TABLE" sql += " IF EXISTS" if env.[:if_exists] # added by schema_plus sql += " #{env.connection.quote_table_name(env.table_name)}" sql += " CASCADE" if env.[:force] == :cascade and support_cascade sql end |