mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-17 00:22:40 +00:00
This commit is contained in:
parent
fd92a092ab
commit
b5ee543b37
|
@ -10,12 +10,19 @@ defmodule Bonfire.Repo.Migrations.GinIndexes do
|
|||
def up do
|
||||
execute "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
|
||||
|
||||
create_index("bonfire_data_social_named", "name")
|
||||
create_index("bonfire_data_identity_character", "username")
|
||||
create_index("bonfire_data_social_profile", "name")
|
||||
|
||||
# create_index("bonfire_data_social_profile", "name")
|
||||
create_index_fields(
|
||||
"bonfire_data_social_profile",
|
||||
"name gin_trgm_ops, summary gin_trgm_ops"
|
||||
)
|
||||
|
||||
create_index_fields(
|
||||
"bonfire_data_social_post_content",
|
||||
"name gin_trgm_ops, summary gin_trgm_ops, html_body gin_trgm_ops"
|
||||
# "name gin_trgm_ops, summary gin_trgm_ops, html_body gin_trgm_ops"
|
||||
"name gin_trgm_ops, summary gin_trgm_ops"
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -28,6 +35,10 @@ defmodule Bonfire.Repo.Migrations.GinIndexes do
|
|||
end
|
||||
|
||||
def create_index_fields(table, fields) do
|
||||
execute """
|
||||
DROP INDEX IF EXISTS #{table}_gin_index;
|
||||
"""
|
||||
|
||||
execute """
|
||||
CREATE INDEX CONCURRENTLY #{table}_gin_index
|
||||
ON #{table}
|
1
justfile
1
justfile
|
@ -833,6 +833,7 @@ sys-deps-debian:
|
|||
|
||||
# to test federation locally you can use `just dev-federate` or `just test-federation-live-DRAGONS`
|
||||
# and run this in seperate terminal to start the above tunnel: `just tunnel-start`
|
||||
# this requires `cargo install tunnelto` (the homebrew version of tunnelto doesn't work)
|
||||
@tunnel-start:
|
||||
echo "Opening tunnel on ${TUNNEL_SUBDOMAIN}.tunnelto.dev"
|
||||
tunnelto --subdomain $TUNNEL_SUBDOMAIN --port 4000
|
||||
|
|
Loading…
Reference in a new issue