Add index to field:
create table(:posts) do
add :rating, :integer
end
create index(:posts, [:rating])
Add index to field:
create table(:posts) do
add :rating, :integer
end
create index(:posts, [:rating])
dokku postgres:list | |
dokku postgres:info DBNAME | |
copy the DSN, something like postgres://postgres:password123@dokku-postgres-DBNAME:5432/db_name | |
dokku postgres:enter DBNAME | |
then inside the postgres container: | |
psql DSN | |
BUT CHANGE THE HOST NAME to localhost in DSN, so it should be something like postgres://postgres:password123@localhost:5432/db_name |
Error install nior4 and html_tokenizer. Use this:
bundle config build.nio4r --with-cflags="-Wno-incompatible-pointer-types"
bundle config build.html_tokenizer --with-cflags="-Wno-incompatible-pointer-types"
bundle install
Don't want to run seafile on port 80, so changing the port to 8000 requires changing some other settings.
Using this docker-compose.yml
services:
db:
image: mariadb:10.11
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=db_dev # Requested, set the root's password of MySQL service.
# 1. run `docker run -rm sentry config generate-secret-key` and copy it to all `SENTRY_SECRET_KEY` values
# 2. run `docker compose up` to start sentry
# 3. run `docker exec sentry sentry upgrade` to migrate db and set up initial user
# 4. visit localhost:9000
volumes:
pgdb:
services:
redis: