Commit Graph

34 Commits

Author SHA1 Message Date
GitLab Bot 39b47b75cf Add latest changes from gitlab-org/gitlab@master 2024-04-24 18:10:01 +00:00
GitLab Bot e52198c836 Add latest changes from gitlab-org/gitlab@master 2023-04-04 00:08:36 +00:00
GitLab Bot 5472bef68d Add latest changes from gitlab-org/gitlab@master 2022-04-06 15:08:23 +00:00
GitLab Bot cdd826bc3a Add latest changes from gitlab-org/gitlab@master 2022-04-01 15:08:40 +00:00
GitLab Bot e40c68997d Add latest changes from gitlab-org/gitlab@master 2022-02-24 12:12:57 +00:00
GitLab Bot f304336f5e Add latest changes from gitlab-org/gitlab@master 2021-05-19 12:10:33 +00:00
GitLab Bot 64f7eb2b37 Add latest changes from gitlab-org/gitlab@master 2021-02-05 12:09:31 +00:00
GitLab Bot e66d6781ef Add latest changes from gitlab-org/gitlab@master 2019-09-26 18:06:29 +00:00
Andreas Brandl 988dc80585
Further remove code branches by database type
We dropped MySQL support and a lot of mysql specific code has been
removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608.

This comes in from the other direction and removes any `if postgresql?`
branches.
2019-07-29 12:47:06 +02:00
Nick Thomas 4aa76dddec
Remove dead MySQL code
None of this code can be reached any more, so it can all be removed
2019-07-23 16:53:03 +01:00
Stan Hu 1dadfff3f5 Move terminate_all_connections into setup Rake task 2019-02-11 21:30:57 -08:00
Stan Hu 5488e8a4a3 Kill all PostgreSQL connections for rake dev:setup
If there are any clients connected to the DB, PostgreSQL won't let you
drop the database. It's possible that Sidekiq, Unicorn, or some other
client will be hanging onto a connection, preventing the DROP DATABASE
from working. To workaround this problem, this method cancels all the
connections so that the db:reset command will work.

Note that there's still a slight possibility a client connects after its
connection is terminated. If this is an issue, we could solve it by
revoking CONNECT access, but for now it seems this works.

Closes https://gitlab.com/gitlab-org/gitlab-development-kit/issues/450
2019-02-11 21:30:57 -08:00
Zeger-Jan van de Weg bbccd31057
Check Gitaly when running `rake dev:setup`
Before this change, trying to setup dev environment could be tried
without having at least one Gitaly running. Cloning the repositories
would fail, but not stop the setup.

Given this would lead to an inconsistent state, a check was added if we
could connect to the server.

Output when it fails:

```
$ rake dev:setup
Failed to connect to Gitaly...
Error: 14:Connect Failed
```
2018-04-19 10:40:28 +02:00
Lin Jen-Shin 8e87ecbf30 Eliminate the warnings from task helpers 2018-01-26 19:42:48 +08:00
Connor Shea efb7da68e6
Fix missed colorize methods. 2016-06-06 15:32:36 -06:00
Yorick Peterse a54af831ba
Use rake db:reset instead of db:setup
Using db:reset ensures existing tables are first dropped. This in turn
ensures that we can drop tables regardless of any foreign key
constraints. While CE currently doesn't have any foreign keys EE defines
the following relation:

    remote_mirrors.project_id -> projects.id

MySQL will complain whenever you try to drop the "projects" table first
even when using "DROP TABLE ... CASCADE".
2016-04-14 15:53:54 +02:00
Yorick Peterse c8f18fc562 Added dedicated Rake task for setting up Postgres
This ensures any PostgreSQL specific schema changes (e.g. expression
indexes) are created when setting up the database.
2015-10-08 14:35:36 +02:00
Dmitriy Zaporozhets b8f12d1917 Replace GITLAB with GitLab in rake task descriptions 2015-06-23 16:52:40 +02:00
Jacob Vosmaer cd61239540 Move the adapter check to the migration 2014-04-23 11:08:51 +02:00
Dmitriy Zaporozhets 665a69941b Revert "Allow to parse heroku-generated database.yml config file."
This reverts commit 8a56e7db48.
Because it actually breaks db setup for mysql
2014-04-08 14:05:57 +03:00
Cyril Rohr 8a56e7db48 Allow to parse heroku-generated database.yml config file. 2014-04-07 15:48:51 +01:00
Dmitriy Zaporozhets 46cc3b22c9
Add mysql limits to db during setup
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-13 10:47:53 +02:00
Andrey Kumanyaev 67ccc8b52a Replace old hashes with new 1.9 ruby hashes (rebase) 2013-05-05 18:01:10 +04:00
Mike Wyatt c6f5b96ba8 allow force=yes rake gitlab:setup for capistrano deploy:cold 2013-02-20 00:14:03 -03:30
Bhagavan Das 08dfbc962b rename setup to setup_db so that it does not collide with gitlab🐚setup task 2013-02-14 21:39:48 +00:00
Dmitriy Zaporozhets 2f019b2b4c cleanup rake tasks since no gitolite required 2013-02-09 15:21:19 +02:00
Riyad Preukschas 65c35466b6 Rename gitlab:app:setup task to gitlab:setup 2013-01-17 21:26:22 +01:00
Riyad Preukschas bc59fd046f Add a warning prompt to the setup task 2013-01-17 21:19:36 +01:00
Riyad Preukschas 501f048846 Rename gitlab:app:enable_automerge to gitlab:enable_automerge 2012-12-20 20:22:25 +01:00
Nihad Abbasov 83696b127b cleanup rake tasks 2012-09-26 04:18:10 -07:00
randx d1daeba173 Updated app:status & docs with hooks. Removed write_hooks from app:setup 2012-08-21 22:45:14 +03:00
randx c625293b99 Handle post-receive files via gitolite, not gitlab 2012-08-21 20:14:06 +03:00
Dmitriy Zaporozhets 7058258a2a Fixed db_schema & reordered rake tasks 2012-04-21 12:45:43 +03:00
Dmitriy Zaporozhets 43f5df21a3 gitlab rake tasks refactored 2012-04-04 01:02:54 +03:00