ruckus / ruckusing-migrations

Database migrations for PHP ala ActiveRecord Migrations with support for MySQL, Postgres, SQLite
Other
506 stars 95 forks source link

CREATE INDEX CONCURRENTLY cannot run inside a transaction block #177

Open jaffarhussain1011 opened 7 years ago

jaffarhussain1011 commented 7 years ago

Hi,

I am using execute method and getting following error:

Base.php(381) : pg_query(): Query failed: ERROR: CREATE INDEX CONCURRENTLY cannot run inside a transaction block

My exact query is as following: $this->get_adapter()->execute_ddl("DROP INDEX IF EXISTS ix_events_type_cd;"); $this->get_adapter()->execute_ddl("CREATE INDEX CONCURRENTLY IF NOT EXISTS ix_events_type_cd ON public.xtable USING btree (type_cd);");

I am using postgres, Any would be appreciated.

thanks, Jaffar