Commit Graph

25 Commits

Author SHA1 Message Date
Guo Xiang Tan f08d440ea0
DEV: Disable migration advisory locks in dev and test environment.
There is a bug in Rails that leaks an idle PG session which will prevent
the dropping of the database.
2020-08-25 14:20:58 +08:00
Sam Saffron 412e1ebbe2 DEV: correct parallel specs rake tasks
This used to work due to side effects.

`rake parallel:migrate` used to work very inconsistently and would only migrate
some of the databases.

This introduces the recommended change to db.yml so the correct database is
found based off TEST_ENV_NUMBER if for some reason we did not set it using
RAILS_DB

Also avoids a bunch of schema dumping which is not needed when migrating
parallel specs



DB number 1 is very odd cause for whatever reason parallel spec is not
setting it.
2019-12-31 14:07:55 +11:00
Guo Xiang Tan 8e5e5d7d35 DEV: Make setting up of multisite DB in test env clearer. 2019-03-21 09:58:07 +08:00
Penar Musaraj 3501533a2b DEV: unpin Prettier version, apply to YAML files
We had Prettier pinned because of https://github.com/prettier/prettier/issues/5529. Since that bug is fixed, unpinning.

Prettier now supports YAML, so this applies Prettier to all .yml except for translations, which should not be edited directly anyway.
2019-01-17 13:05:39 -05:00
Robin Ward d333155cd5 Support user defined postgres timeouts 2017-10-27 09:59:44 -04:00
Guo Xiang Tan d4388f54a2 FIX: Use exact patht to ensure we always redirect with the right format. 2017-09-28 10:29:41 +08:00
Guo Xiang Tan a324a8a9d4 Bump test AR pool to 10 while I investigate. 2017-09-26 17:52:16 +08:00
Guo Xiang Tan 23b787e0a6 Require dependency otherwise it causes Sidekiq to lock up in development. 2017-09-25 13:48:59 +08:00
Robin Ward 153eca23e3 Switch Development Database via ENV var
This is useful if you use multiple development databases locally
and don't want to constantly `db:drop db:create` into
`discourse_development`.

Simply add `DISCOURSE_DEV_DB=whatever_db` as an ENV variable and
Discourse will use it in development mode.
2017-09-04 12:14:34 -04:00
Guo Xiang Tan 2c39743d5d Introduce multisite tests for better coverage. 2017-08-08 12:58:22 +09:00
Axel Naumann 20a08561bc Make PgSQL happy ("ActiveRecord::StatementInvalid: PG::ProtocolViolation").
See https://meta.discourse.org/t/install-error-protocol-violation-with-postgresql/35160
2016-03-30 10:42:06 +02:00
Sam dfe3ecb914 PERF: disable prepared statements
see: https://github.com/rails/rails/issues/21992
2015-10-19 14:02:22 +11:00
Akshay d64d3aa2e2 fixed a spelling benchamarking -> benchmarking 2014-08-14 10:16:57 +05:30
Sam abe814412e Source DB config more cleanly, fixes issues with socket in prd 2014-01-15 12:08:35 +11:00
Sam 81eec5ff06 remove "host" so it uses sockets by default, easier to configure 2013-12-30 13:02:38 +11:00
Sam b312b4d563 clean up config to use global settings 2013-12-20 15:12:23 +11:00
Sam 9cecabd023 don't warn unless in production 2013-12-19 09:59:44 +11:00
Sam 14d21ec865 improve config so you can use it with a socket optionally 2013-12-18 19:23:58 +11:00
Sam a85333790f attempt to bypass setting port if socket is provided 2013-12-18 17:48:54 +11:00
Sam a7421f8612 correct parsing 2013-12-18 17:21:01 +11:00
Sam 573e3bd348 fix error message 2013-12-18 17:17:12 +11:00
Sam 5232f0efd1 default to a db called postgres 2013-12-18 16:54:47 +11:00
Sam ffffee3ae1 IMPORTANT - removed all sample files
This is very likely to cause merge conflict, it is for the greater good
Discuss at: http://meta.discourse.org/t/enough-with-the-sample-files/10351

From now on we use ENV to customise if needed
2013-12-18 16:46:37 +11:00
Robin Ward be9c374285 Oops, database.yml and redis.yml were still included 2013-02-12 11:32:32 -05:00
Robin Ward 21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00