impress/config/database.yml
Emi Matchu 470c805880 Save last trade activity time onto User
In impress-2020, we do a big slow query to figure out which users have
been active in trades recently. Now, we cache that timestamp on the
User model.

This won't have any immediate effect; it's to clear the way for Classic
DTI to receive the better trade ratios feature people like from 2020.

I also added some unit testing infra because I finally wanted it! for
all the ways you can trigger this timestamp lol

Note too that this is a bit of an unusually complex migration, but my
hope is that the batching and query structure and such helps it run
surprisingly fast! 🤞
2024-01-19 00:00:46 -08:00

63 lines
1.8 KiB
YAML

development:
primary:
# You can override these default settings with this environment variable,
# fully or partially. We do this in the .devcontainer setup!
url: <%= ENV['DATABASE_URL_PRIMARY_DEV'] %>
adapter: mysql2
database: openneo_impress
username: impress_dev
password: impress_dev
pool: 5
variables:
sql_mode: TRADITIONAL
openneo_id:
# You can override these default settings with this environment variable,
# fully or partially. We do this in the .devcontainer setup!
url: <%= ENV['DATABASE_URL_OPENNEO_ID_DEV'] %>
adapter: mysql2
database: openneo_id
username: impress_dev
password: impress_dev
pool: 2
variables:
sql_mode: TRADITIONAL
migrations_paths: db/openneo_id_migrate
test:
primary:
# You can override these default settings with this environment variable,
# fully or partially. We do this in the .devcontainer setup!
url: <%= ENV['DATABASE_URL_PRIMARY_TEST'] %>
adapter: mysql2
database: openneo_impress_test
username: impress_dev
password: impress_dev
pool: 5
variables:
sql_mode: TRADITIONAL
openneo_id:
# You can override these default settings with this environment variable,
# fully or partially. We do this in the .devcontainer setup!
url: <%= ENV['DATABASE_URL_OPENNEO_ID_TEST'] %>
adapter: mysql2
database: openneo_id_test
username: impress_dev
password: impress_dev
pool: 2
variables:
sql_mode: TRADITIONAL
migrations_paths: db/openneo_id_migrate
production:
primary:
url: <%= ENV['DATABASE_URL_PRIMARY'] %>
variables:
sql_mode: TRADITIONAL
openneo_id:
url: <%= ENV['DATABASE_URL_OPENNEO_ID'] %>
variables:
sql_mode: TRADITIONAL
migrations_paths: db/openneo_id_migrate