mirror of
https://github.com/ilyakooo0/reshape.git
synced 2024-11-25 23:13:29 +03:00
Fix bad SQL query in abort for remove_column
This commit is contained in:
parent
afea8e304a
commit
80cea7f94e
@ -58,7 +58,7 @@ impl Action for RemoveColumn {
|
||||
CREATE OR REPLACE FUNCTION {trigger_name}()
|
||||
RETURNS TRIGGER AS $$
|
||||
BEGIN
|
||||
IF NEW.{column_name} IS NULL THEN
|
||||
IF NOT reshape.is_old_schema() IS NULL THEN
|
||||
DECLARE
|
||||
{declarations}
|
||||
BEGIN
|
||||
@ -114,7 +114,7 @@ impl Action for RemoveColumn {
|
||||
|
||||
fn abort(&self, ctx: &MigrationContext, db: &mut dyn Conn) -> anyhow::Result<()> {
|
||||
// Remove function and trigger
|
||||
db.query(&format!(
|
||||
db.run(&format!(
|
||||
"
|
||||
DROP TRIGGER IF EXISTS {trigger_name} ON {table};
|
||||
DROP FUNCTION IF EXISTS {trigger_name};
|
||||
|
Loading…
Reference in New Issue
Block a user