Error zero length delimited identifier at or near

Join tables in Ruby on Rails Primary key errors from a join table in a RoR database If you’ve found this page, its probably because you have seen one of these errors for a join table in postgres with Ruby on Rails: ActiveRecord::UnknownPrimaryKey: Unknown primary key for table ERROR: zero-length delimited identifier at or […]

Содержание

  1. Join tables in Ruby on Rails
  2. Primary key errors from a join table in a RoR database
  3. Best practice
  4. When to add fields to join tables
  5. Eliminate other issues
  6. Primary key workaround
  7. Migrations, schemas, and primary keys
  8. Error zero length delimited identifier at or near
  9. QGIS » QGIS Application
  10. Задачи
  11. Сохранённые запросы
  12. Bug report #5883
  13. Erroneous query: zero-length delimited identifier at or near «»»»
  14. Связанные редакции
  15. История
  16. #1 Обновлено Paolo Cavallini больше 10 лет назад
  17. #2 Обновлено Giuseppe Sucameli больше 10 лет назад
  18. #3 Обновлено Jürgen Fischer больше 10 лет назад
  19. #4 Обновлено James Stott больше 10 лет назад
  20. #5 Обновлено Jürgen Fischer больше 10 лет назад
  21. #6 Обновлено James Stott больше 10 лет назад
  22. #7 Обновлено Jürgen Fischer больше 10 лет назад
  23. #8 Обновлено James Stott больше 10 лет назад
  24. #9 Обновлено Paolo Cavallini больше 10 лет назад
  25. #10 Обновлено Giuseppe Sucameli больше 10 лет назад
  26. #11 Обновлено Sandro Santilli больше 10 лет назад
  27. #12 Обновлено Giuseppe Sucameli больше 10 лет назад
  28. #13 Обновлено Jürgen Fischer больше 10 лет назад
  29. #14 Обновлено Giuseppe Sucameli больше 10 лет назад
  30. #15 Обновлено Sandro Santilli больше 10 лет назад
  31. #16 Обновлено Giuseppe Sucameli больше 10 лет назад
  32. #17 Обновлено Sandro Santilli больше 10 лет назад
  33. #18 Обновлено Sandro Santilli больше 10 лет назад
  34. #19 Обновлено Giuseppe Sucameli больше 10 лет назад

Join tables in Ruby on Rails

Primary key errors from a join table in a RoR database

If you’ve found this page, its probably because you have seen one of these errors for a join table in postgres with Ruby on Rails:

ActiveRecord::UnknownPrimaryKey: Unknown primary key for table

ERROR: zero-length delimited identifier at or near «»»»

Best practice

In theory, you should create Rails join tables without a primary key. From about Rails 4 onwards, this works for “plain” unedited join tables with no added parameters.

If you are using an unedited join table, and you see these errors, it’s worth checking that the has_many and belongs_to settings, because you may have a mistake somewhere in the model or schema.

Best practice suggests that it’s not a good idea to add parameters to join tables: and to be clear, I don’t recommend it. Like all good rules though, there are times when it’s right to make an exception, here’s a fairly standard scenario.

When to add fields to join tables

You build a review site, with a table for users, and a table for things-being-reviewed, let’s say books. You create a join table along these lines:

Adding fields to a join table isn’t perhaps best practice, but occasionally all the other options are worse. For example, I‘m not sure it’s right to build a whole new table just for a couple of fields. So you go ahead with the migration above.

At first it works well, users can create BookUser reviews, and if they are never allowed to edit their review scores, you might not notice any problems.

But if you allow users to edit a BookUser review, they will start to see the errors above. Any attempts to update_attributes or save an updated BookUser entry will fail.

Eliminate other issues

If you aren’t using a join table, there may be other causes for the errors: you should have a primary key, one thing to check is that the model is using the correct table and primary key name.

If you are using a join table, one thing to eliminate is the validations, for example, if you have this:

It fails on update, a quick workaround is to enforce it on create only

But, depending on what the code is doing, there may still be errors on update and save. If so, check for typos again, then keep reading…

Primary key workaround

I have seen several discussions on various forums around whether or not the primary key and /or zero-length delimited identifier errors constitute a “bug”, which generally conclude that it might be, but there is a usage / database design aspect as well, and/or for various reasons we aren’t expecting a “fix”.

Mostly it seems the posters give up and fall back to a reasonable workaround, which is to add an explicit primary key to the join table.

This should fix the errors.

Migrations, schemas, and primary keys

However, you might now trip over a related “feature” of the ruby on rails schema. This is an extract from schema.rb for the join table:

… and it will look identical, whichever migration was used, whether or not they add an explicit primary key.

Depending on how the table is created in the migration, here’s what happens:

  • create_join_table with no explicit primary key, no primary key
  • create_join_table with explicit primary key, primary key created
  • create_table with no explicit primary key, primary key created automatically

The behaviour is not well documented.

But there is another issue: all three migration tables look identical in schema.rb! Rails hides a default primary key from schema.rb, I assume on the grounds that it is not very interesting.

As a result, if you solve this problem once, then go back to the schema and models to find out what the fix was, you can spend a long time looking!! Also, it makes it very difficult to connect the migrations with the schema: it looks like there are missing fields, and for this reason I’d love to see the Ruby on Rails schema style change in future — I guess there are practical problems with retro-fitting this to existing schemas.

In the meantime, I wrote this post to remind myself and anyone else who trips over it in future.

Источник

Error zero length delimited identifier at or near

SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near «»»»\nnLINE 1: set search_path to «»\nn ^ (SQL: select count(*) as aggregate from «categoria» where «deleted_at» is null and «categoria».»deleted_at» is null).n n

Try to run «php artisan » alone. If you get the same error, then there’s probably a command (App\Console\Commands) which was created on this project and has an error in it. n

/code/controle-interno$ php artisan migraten**************************************n* Application In Production! *n**************************************nn Do you really wish to run this command? (yes/no) [no]:n > yesnnnIn Connection.php line 664:nn SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near «»»»n LINE 1: set search_path to «»n ^ (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations)nnnIn PDOStatement.php line 143:nn SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near «»»»n LINE 1: set search_path to «»n ^nnnIn PDOStatement.php line 141:nn SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near «»»»n LINE 1: set search_path to «»n ^nn n

and when I go to the page, I get this error n

Illuminate\Database\QueryException thrown with message «SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near «»»»nLINE 1: set search_path to «»n ^ (SQL: select count(*) as aggregate from «categoria» where «deleted_at» is null and «categoria».»deleted_at» is null)»nn n»,»bodyInMarkdown»:»@mattsplat This place happens when I run the php artisan migrate command. In vagrant, this error appears rnrn«`bashrnvagrant@homestead:

/code/controle-interno$ php artisan migratern**************************************rn* Application In Production! *rn**************************************rnrn Do you really wish to run this command? (yes/no) [no]:rn > yesrnrnrnIn Connection.php line 664:rnrn SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near »»»»rn LINE 1: set search_path to »»rn ^ (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations)rnrnrnIn PDOStatement.php line 143:rnrn SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near »»»»rn LINE 1: set search_path to »»rn ^rnrnrnIn PDOStatement.php line 141:rnrn SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near »»»»rn LINE 1: set search_path to »»rn ^rnrn«`rnrnand when I go to the page, I get this errorrnrn«`rnIlluminate\Database\QueryException thrown with message »SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near »»»»rnLINE 1: set search_path to »»rn ^ (SQL: select count(*) as aggregate from »categoria» where »deleted_at» is null and »categoria».»deleted_at» is null)»rnrn«`»,»replies»:[],»user»:<«id»:114827,»username»:»iagofrota»,»avatar»:»//unavatar.io/github/iagofrota»,»experience»:<«award_count»:»0″,»level»:1,»points»:»250″,»pointsUntilNextLevel»:»4,750″>,»achievements»:[],»reported»:null,»staff»:false,»subscribed»:false,»profile»:<«full_name»:null,»bio»:null,»twitter»:»»,»github»:»iagofrota»,»website»:»»,»employment»:»»,»job_title»:»»,»location»:»Sobral, CE»,»flag»:»br»,»available_for_hire»:1>,»dateSegments»:<«created_diff»:»4 years ago»>,»settings»:<«show_profile»:true>,»links»:<«profile»:»https://laracasts.com/@iagofrota»>>,»likes»:[],»created_at»:»2018-06-26T21:46:26.000000Z»,»links»:<«delete»:»/discuss/replies/436518″,»like»:»/discuss/replies/436518/likes»,»best_answer»:»/discuss/conversations/89077/best»>,»best_answer»:false,»dateSegments»:<«createdDiff»:»4 years ago»>>,<«id»:436519,»conversation_id»:89077,»body»:»

I was able to solve my problem by changing the $schema variable of the configureSchema ($connection, $config) method of the /vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php class to the schema I created. n

Before n

/**n * Set the schema on the connection.n *n * @param \PDO $connectionn * @param array $confign * @return voidn */nprotected function configureSchema($connection, $config)n<n if (isset($config[‘schema’])) <n $schema = $this->formatSchema($config[‘schema’]);nn $connection->prepare(«set search_path to <$schema>«)->execute();n >n>n n

/**n * Set the schema on the connection.n *n * @param \PDO $connectionn * @param array $confign * @return voidn */nprotected function configureSchema($connection, $config)n<n if (isset($config[‘schema’])) <n // $schema = $this->formatSchema($config[‘schema’]);n $schema = ‘controle_interno’;nn $connection->prepare(«set search_path to <$schema>«)->execute();n >n>n n

I realized the problem debugging the stacktrace and realized that for some reason the $schema variable was coming empty. n

I was able to solve my problem by changing the $schema variable of the configureSchema ($connection, $config) method of the /vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php class to the schema I created. n

Before n

/**n * Set the schema on the connection.n *n * @param \PDO $connectionn * @param array $confign * @return voidn */nprotected function configureSchema($connection, $config)n<n if (isset($config[‘schema’])) <n $schema = $this->formatSchema($config[‘schema’]);nn $connection->prepare(«set search_path to <$schema>«)->execute();n >n>n n

/**n * Set the schema on the connection.n *n * @param \PDO $connectionn * @param array $confign * @return voidn */nprotected function configureSchema($connection, $config)n<n if (isset($config[‘schema’])) <n // $schema = $this->formatSchema($config[‘schema’]);n $schema = ‘controle_interno’;nn $connection->prepare(«set search_path to <$schema>«)->execute();n >n>n n

I realized the problem debugging the stacktrace and realized that for some reason the $schema variable was coming empty. n

If someone succinctly explains why this error is happening, I mark it as an answer. n»,»bodyInMarkdown»:»I was able to solve my problem by changing the `$schema` variable of the `configureSchema ($connection, $config)` method of the `/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php` class to the schema I created.rnrn**Before**rnrn /**rn * Set the schema on the connection.rn *rn * @param \PDO $connectionrn * @param array $configrn * @return voidrn */rn protected function configureSchema($connection, $config)rn <rn if (isset($config[‘schema’])) <rn $schema = $this->formatSchema($config[‘schema’]);rnrn $connection->prepare(»set search_path to <$schema>»)->execute();rn >rn >rnrn**After**rnrn /**rn * Set the schema on the connection.rn *rn * @param \PDO $connectionrn * @param array $configrn * @return voidrn */rn protected function configureSchema($connection, $config)rn <rn if (isset($config[‘schema’])) <rn // $schema = $this->formatSchema($config[‘schema’]);rn $schema = ‘controle_interno’;rnrn $connection->prepare(»set search_path to <$schema>»)->execute();rn >rn >rnrnI realized the problem debugging the stacktrace and realized that for some reason the `$schema` variable was coming empty. rnrnIf someone succinctly explains why this error is happening, I mark it as an answer.»,»user»:<«id»:114827,»username»:»iagofrota»,»avatar»:»//unavatar.io/github/iagofrota»,»achievements»:[],»reported»:null,»staff»:false,»subscribed»:false,»profile»:<«full_name»:null,»bio»:null,»twitter»:»»,»github»:»iagofrota»,»website»:»»,»employment»:»»,»job_title»:»»,»location»:»Sobral, CE»,»flag»:»br»,»available_for_hire»:1>,»dateSegments»:<«created_diff»:»4 years ago»>,»settings»:<«show_profile»:true>,»links»:<«profile»:»https://laracasts.com/@iagofrota»>>,»likes»:[],»created_at»:»2018-07-05T19:41:41.000000Z»,»links»:<«delete»:»/discuss/replies/438669″,»like»:»/discuss/replies/438669/likes»,»best_answer»:»/discuss/conversations/89077/best»>,»best_answer»:true,»dateSegments»:<«createdDiff»:»4 years ago»>>,»recommended»:[<«id»:142,»className»:»Laracasts\Series»,»title»:»Laravel 8 From Scratch»,»body»:»

rnWe don’t learn tools for the sake of learning tools. Instead, we learn them because they help us accomplish a particular goal. With that in mind, in this series, we’ll use the common desire for a blog — with categories, tags, comments, email notifications, and more — as our goal. Laravel will be the tool that helps us get there. Each lesson, geared toward newcomers to Laravel, will provide instructions and techniques that will get you to the finish line. rn rn

Источник

QGIS » QGIS Application

Задачи

Сохранённые запросы

Bug report #5883

Erroneous query: zero-length delimited identifier at or near «»»»

Статус: Closed
Приоритет: Normal
Назначена: Jürgen Fischer
Категория: Data Provider/PostGIS
Affected QGIS version: 1.8.0 Regression?: Нет
Operating System: Easy fix?: Нет
Pull Request or Patch supplied: Нет Resolution:
Crashes QGIS or corrupts data: Нет Copied to github as #: 15339

Описание

SQL window, retriving the data worked, loading as layer didn’t (but didn’t visually report any error)

Error/debug on the console:

Связанные редакции

История

#1 Обновлено Paolo Cavallini больше 10 лет назад

  • Параметр Назначена изменился на Giuseppe Sucameli

#2 Обновлено Giuseppe Sucameli больше 10 лет назад

  • Параметр Категория изменился с DB Manager на Data Provider/PostGIS

It’s a bug on the PG provider. The schema part is added also for queries (a check is missing).

#3 Обновлено Jürgen Fischer больше 10 лет назад

SQL window, retriving the data worked, loading as layer didn’t (but didn’t visually report any error)

Can you reproduce the problem with something that doesn’t need the latest postgis?

BTW you should «visually» see the error in the message log (and the popup over the in the main window status bar).

#4 Обновлено James Stott больше 10 лет назад

I have changed my code slightly from the original code I posted on the mailing list and I get a slightly different error:

This query works and adds a layer into QGIS:

uri.setDataSource(»,»(SELECT int4(row_number() OVER ()) AS id,ST_GeomFromText(‘POINT(451583 129144)’,27700) As geom)», «geom»,»,»id»)

The following doesn’t work:

uri.setDataSource(»,»(SELECT * From \»designations\».\»table\» where ST_DWithin(ST_GeomFromText(‘POINT(451583 129144)’,27700), \»table\».\»geom\», 2000)», «geom»,»,»gid»)

This gives the following error:

Unable to execute the query.
The error message from the database was:
ERROR: syntax error at or near «AS»
LINE 1: . 129144)’,27700), «listed_building».»geom», 2000) AS «subQue.
^
.
SQL: SELECT * FROM (SELECT * From «designations».»listed_building» where ST_DWithin(ST_GeomFromText(‘POINT(451583 129144)’,27700), «listed_building».»geom», 2000) AS «subQuery_0» LIMIT 1

Does seem like there is an extra SELECT statement added to the from of the query as it says SELECT * FROM (SELECT * From. The from in my code is From not FROM.

#5 Обновлено Jürgen Fischer больше 10 лет назад

James Stott wrote:

uri.setDataSource(»,»(SELECT * From \»designations\».\»table\» where ST_DWithin(ST_GeomFromText(‘POINT(451583 129144)’,27700), \»table\».\»geom\», 2000)», «geom»,»,»gid»)

And that’s not just because the closing paren is missing after «2000)»?

#6 Обновлено James Stott больше 10 лет назад

Adding the ) leads to this error:

Unable to execute the query.
The error message from the database was:
ERROR: subquery in FROM must have an alias
LINE 1: SELECT * FROM (SELECT * From designations.listed_building wh.
^
HINT: For example, FROM (SELECT . ) [AS] foo.
.
SQL: SELECT * FROM (SELECT * From designations.listed_building where ST_DWithin(ST_GeomFromText(‘POINT ‘,27700), listed_building.geom, 2000)), geom,»,gid) AS «subQuery_0» LIMIT 1

#7 Обновлено Jürgen Fischer больше 10 лет назад

James Stott wrote:

Please check the syntax again. Looks like you misplaced the » this time 😉

#8 Обновлено James Stott больше 10 лет назад

Apologies, it was a syntax problem.

This worked:

query = «(SELECT * From \»designations\».\»table\»where ST_DWithin(ST_GeomFromText(‘POINT(» + str(self.dlg.getEasting()) + » » + str(self.dlg.getNorthing()) + «)’,27700), \»table\».\»geom\»,»+ self.dlg.getBuffSize() +»))»
uri.setDataSource(», query, «geom»,»,»gid»)

#9 Обновлено Paolo Cavallini больше 10 лет назад

  • Параметр Версия изменился на Version 2.0.0

#10 Обновлено Giuseppe Sucameli больше 10 лет назад

  • Параметр Статус изменился с Open на Feedback

Jürgen Fischer wrote:

SQL window, retriving the data worked, loading as layer didn’t (but didn’t visually report any error)

Can you reproduce the problem with something that doesn’t need the latest postgis?

BTW you should «visually» see the error in the message log (and the popup over the in the main window status bar).

strk, could you please provide more info?

#11 Обновлено Sandro Santilli больше 10 лет назад

This query doesn’t need the latest postgis, nor any table:

Try it, replacing «unioned» and «wrongsnap» with a valid geometry column and table name.
It’s still failing as of:

I still tried trough the DBManager, don’t know if it’s possible (or how) to reproduce directly against the PostGIS Data Provider. Maybe Giuseppe knows ?

#12 Обновлено Giuseppe Sucameli больше 10 лет назад

Sandro Santilli wrote:

I still tried trough the DBManager, don’t know if it’s possible (or how) to reproduce directly against the PostGIS Data Provider. Maybe Giuseppe knows ?

Try the following code from QGis Python Console:

#13 Обновлено Jürgen Fischer больше 10 лет назад

Giuseppe Sucameli wrote:

Try the following code from QGis Python Console:
[. ]

Should that reproduce the problem? Because it doesn’t here.

#14 Обновлено Giuseppe Sucameli больше 10 лет назад

Jürgen Fischer wrote:

Try the following code from QGis Python Console:
[. ]

Should that reproduce the problem? Because it doesn’t here.

I know, neither here. But that code is quite identical to the one used in DBManager.

#15 Обновлено Sandro Santilli больше 10 лет назад

I’ve no time to debug this. Can’t you reproduce it there Giuseppe ?

#16 Обновлено Giuseppe Sucameli больше 10 лет назад

  • Параметр Назначена изменился с Giuseppe Sucameli на Jürgen Fischer
  • Параметр Статус изменился с Feedback на Open

Sandro Santilli wrote:

I’ve no time to debug this. Can’t you reproduce it there Giuseppe ?

Not reproduced yet, anyway I’ve found it.

@Jef: I’ve assigned the ticket to you, I don’t know how to handle estimated metadata option together with queries.

#17 Обновлено Sandro Santilli больше 10 лет назад

No way to estimate extent of a query. You must necessarely run it.

#18 Обновлено Sandro Santilli больше 10 лет назад

#19 Обновлено Giuseppe Sucameli больше 10 лет назад

It works until the «use table estimated metadata» option is checked in the connection settings, in that case I get the following error:

Erroneous query: SELECT DISTINCT CASE WHEN upper(geometrytype(«geom»)) IN (‘POINT’,’MULTIPOINT’,’POINTM’,’MULTIPOINTM’) THEN ‘POINT’ WHEN upper(geometrytype(«geom»)) IN (‘LINESTRING’,’MULTILINESTRING’,’LINESTRINGM’,’MULTILINESTRINGM’) THEN ‘LINESTRING’ WHEN upper(geometrytype(«geom»)) IN (‘POLYGON’,’MULTIPOLYGON’,’POLYGONM’,’MULTIPOLYGONM’) THEN ‘POLYGON’ END, st_srid(«geom») FROM (SELECT «geom» FROM «».»(select 1 as id, (ST_Dump(ST_ConvexHull(st_collect(‘POINT ‘::geometry)))).* FROM «»province»»
) AS «»subQuery_0″»» WHERE «geom» IS NOT NULL LIMIT 100) AS t returned 7 [ERROR: zero-length delimited identifier at or near «»»»
LINE 1: . ON’ END, st_srid(«geom») FROM (SELECT «geom» FROM «».»(selec.
^
]

the problem occurs also with very simple queries like:

Источник

@edgarv09

Trying to use this gem in postgres with postgis extension am getting this error. using BlackList

PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 1: ... "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3
                                                                ^
: UPDATE "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3 (ActiveRecord::StatementInvalid)

the same for another table

 ERROR -- : PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 1: ...T "name" = $1, "phone" = $2 WHERE "basic_quotations"."" = $3
                                                                ^
: UPDATE "basic_quotations" SET "name" = $1, "phone" = $2 WHERE "basic_quotations"."" = $3 (ActiveRecord::StatementInvalid)
E, [2019-01-24T16:21:34.655710 #27117] ERROR -- : /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `async_exec_params'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `block (2 levels) in exec_no_cache'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:610:in `block in exec_no_cache'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `block in log'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:569:in `log'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in `exec_no_cache'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `execute_and_clear'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:94:in `exec_delete'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:162:in `update'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:21:in `update'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/composite_primary_keys-11.1.0/lib/composite_primary_keys/persistence.rb:38:in `_update_record'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/persistence.rb:479:in `update_columns'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/blacklist.rb:15:in `process_record'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:191:in `process_record_if'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:120:in `block in process_table'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:117:in `process_table'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:101:in `process'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:68:in `block in anonymize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:66:in `each'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:66:in `anonymize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:46:in `anonymize'
  /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/dsl.rb:10:in `database'
  rdbms_whitelist_generated.rb:7:in `<main>'
E, [2019-01-24T16:21:34.656483 #27117] ERROR -- : PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 1: ... "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3
                                                                ^
: UPDATE "users" SET "name" = $1, "email" = $2 WHERE "users"."" = $3 (ActiveRecord::StatementInvalid)

@sunitparekh

Please share your Anonymization Definition file to help further.

— Sunit

On 25-Jan-2019, at 3:05 AM, Edgar Villamarin ***@***.***> wrote:

Trying to use this gem in postgres with postgis extension am getting this error.

PG::SyntaxError: ERROR: zero-length delimited identifier at or near «»»»
LINE 1: … «users» SET «name» = $1, «email» = $2 WHERE «users».»» = $3
^
: UPDATE «users» SET «name» = $1, «email» = $2 WHERE «users».»» = $3 (ActiveRecord::StatementInvalid)
the same for another table

ERROR — : PG::SyntaxError: ERROR: zero-length delimited identifier at or near «»»»
LINE 1: …T «name» = $1, «phone» = $2 WHERE «basic_quotations».»» = $3
^
: UPDATE «basic_quotations» SET «name» = $1, «phone» = $2 WHERE «basic_quotations».»» = $3 (ActiveRecord::StatementInvalid)
E, [2019-01-24T16:21:34.655710 #27117] ERROR — : /Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `async_exec_params’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `block (2 levels) in exec_no_cache’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:610:in `block in exec_no_cache’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `block in log’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb:23:in `instrument’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:569:in `log’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in `exec_no_cache’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `execute_and_clear’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:94:in `exec_delete’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:162:in `update’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:21:in `update’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/composite_primary_keys-11.1.0/lib/composite_primary_keys/persistence.rb:38:in `_update_record’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/persistence.rb:479:in `update_columns’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/blacklist.rb:15:in `process_record’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:191:in `process_record_if’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:120:in `block in process_table’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:117:in `process_table’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/strategy/base.rb:101:in `process’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:68:in `block in anonymize’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:66:in `each’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:66:in `anonymize’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/database.rb:46:in `anonymize’
/Users/edgarLH/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/data-anonymization-0.8.3/lib/core/dsl.rb:10:in `database’
rdbms_whitelist_generated.rb:7:in `<main>’
E, [2019-01-24T16:21:34.656483 #27117] ERROR — : PG::SyntaxError: ERROR: zero-length delimited identifier at or near «»»»
LINE 1: … «users» SET «name» = $1, «email» = $2 WHERE «users».»» = $3
^
: UPDATE «users» SET «name» = $1, «email» = $2 WHERE «users».»» = $3 (ActiveRecord::StatementInvalid)

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@edgarv09

@sunitparekh

Skip to content



Open


Issue created Jan 29, 2021 by Will Chandler@wchandlerDeveloper

Swap Partitioned Audit Events migration failing with error ‘zero-length delimited identifier at or near «»»»‘ ‘ when upgrading to v13.8.1

Summary

When upgrading a Kubernetes GitLab instance from 13.7.1 to 13.8.1, migration failed with error:

PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 2: ALTER COLUMN "" DROP DEFAULT;

This has caused a number of sidekiq and webservice pods to go into CrashLoopBackOff status and prevented the instance from fully upgrading to 13.8.1.

Steps to reproduce

Unclear what about this customer’s instance triggered this error, but the only action taken was to upgrade to 13.8.1

What is the current bug behavior?

Migration 20201112215132 SwapPartitionedAuditEvents fails.

What is the expected correct behavior?

All migrations succeed after upgrade to 13.8.1

Relevant logs and/or screenshots

Migration error stracktrace

ALTER TABLE "gitlab_partitions_dynamic"."audit_events_part_5fc467ac26_202107"
RENAME CONSTRAINT "audit_events_part_5fc467ac26_202107_pkey" TO "audit_events_202107_pkey";

ALTER TABLE "gitlab_partitions_dynamic"."audit_events_part_5fc467ac26_202107"
RENAME TO "audit_events_202107"")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 2: ALTER COLUMN "" DROP DEFAULT;
                     ^
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `exec'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `block (2 levels) in execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:91:in `block in execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:90:in `execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia.rb:71:in `execute_with_marginalia'
/srv/gitlab/lib/gitlab/database/partitioning/replace_table.rb:32:in `execute'
/srv/gitlab/lib/gitlab/database/partitioning/replace_table.rb:27:in `perform'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:425:in `block in replace_table'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:121:in `run_block'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:130:in `block in run_block_with_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:125:in `run_block_with_transaction'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:95:in `run'
/srv/gitlab/lib/gitlab/database/migration_helpers.rb:394:in `with_lock_retries'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:422:in `replace_table'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:206:in `replace_with_partitioned_table'
/srv/gitlab/db/migrate/20201112215132_swap_partitioned_audit_events.rb:9:in `up'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:831:in `exec_migration'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:811:in `block in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:810:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1002:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1361:in `ddl_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1280:in `each'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1229:in `block in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1229:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1061:in `up'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1036:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <main>'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `each'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <main>'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/srv/gitlab/bin/bundle:3:in `load'
/srv/gitlab/bin/bundle:3:in `<main>'

Caused by:
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 2: ALTER COLUMN "" DROP DEFAULT;
                     ^
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `exec'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `block (2 levels) in execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:91:in `block in execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:90:in `execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia.rb:71:in `execute_with_marginalia'
/srv/gitlab/lib/gitlab/database/partitioning/replace_table.rb:32:in `execute'
/srv/gitlab/lib/gitlab/database/partitioning/replace_table.rb:27:in `perform'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:425:in `block in replace_table'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:121:in `run_block'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:130:in `block in run_block_with_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:125:in `run_block_with_transaction'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:95:in `run'
/srv/gitlab/lib/gitlab/database/migration_helpers.rb:394:in `with_lock_retries'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:422:in `replace_table'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:206:in `replace_with_partitioned_table'
/srv/gitlab/db/migrate/20201112215132_swap_partitioned_audit_events.rb:9:in `up'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:831:in `exec_migration'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:811:in `block in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:810:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1002:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1361:in `ddl_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1280:in `each'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1229:in `block in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1229:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1061:in `up'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1036:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <main>'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `each'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <main>'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/srv/gitlab/bin/bundle:3:in `load'
/srv/gitlab/bin/bundle:3:in `<main>'

Caused by:
PG::SyntaxError: ERROR:  zero-length delimited identifier at or near """"
LINE 2: ALTER COLUMN "" DROP DEFAULT;
                     ^
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `exec'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `block (2 levels) in execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:91:in `block in execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:90:in `execute'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/marginalia-1.10.0/lib/marginalia.rb:71:in `execute_with_marginalia'
/srv/gitlab/lib/gitlab/database/partitioning/replace_table.rb:32:in `execute'
/srv/gitlab/lib/gitlab/database/partitioning/replace_table.rb:27:in `perform'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:425:in `block in replace_table'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:121:in `run_block'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:130:in `block in run_block_with_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:125:in `run_block_with_transaction'
/srv/gitlab/lib/gitlab/database/with_lock_retries.rb:95:in `run'
/srv/gitlab/lib/gitlab/database/migration_helpers.rb:394:in `with_lock_retries'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:422:in `replace_table'
/srv/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:206:in `replace_with_partitioned_table'
/srv/gitlab/db/migrate/20201112215132_swap_partitioned_audit_events.rb:9:in `up'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:831:in `exec_migration'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:811:in `block in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:810:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1002:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1361:in `ddl_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1280:in `each'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1229:in `block in migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1229:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1061:in `up'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/migration.rb:1036:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <main>'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `each'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <main>'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/srv/gitlab/bin/bundle:3:in `load'
/srv/gitlab/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
git@gitlab-task-runner-7cc6ffd65f-bw62x:/$

Edited Jan 29, 2021 by Will Chandler

Понравилась статья? Поделить с друзьями:
  • Error your remaining space is less than 5gb in drive c unable to unzip firmware
  • Error your password must be changed from the default password please change it
  • Error your local changes would be overwritten by revert
  • Error your local changes to the following files would be overwritten by merge readme md
  • Error your local changes to the following files would be overwritten by merge package json