gitlab-org--gitlab-foss/doc/development/README.md
Toon Claes ce830d3c60 Add Gitlab::Database::Subquery.self_join to delete_all with limit
`delete_all` doesn't support limit, so you'd need to subquery
that. And instead of subquerying with `where(id: query)`, it's better
to use an `INNER JOIN`. This method also works with MySQL, while
subquerying doesn't (without another layer of subquerying)

Reference:
https://stackoverflow.com/questions/17892762/mysql-this-version-of-mysql-doesnt-yet-support-limit-in-all-any-some-subqu/17892886#17892886
2018-09-20 16:27:09 +02:00

4.8 KiB

comments description
false Learn how to contribute to GitLab.

GitLab development guides

Get started!

Processes

UX and frontend guides

Backend guides

Performance guides

Database guides

Tooling

Migrations

Best practices

Testing guides

Documentation guides

Internationalization (i18n) guides

Build guides

Compliance