Conversation
…move TypeScript version
|
|
||
| # Apply optimizations to PostgreSQL | ||
| pg-apply-optimizations: | ||
| sqlx migrate run --source sql/migrations |
There was a problem hiding this comment.
That's a good idea, but I suppose the migrations require certain file-names and structure? I get this:
$ just pg-apply-optimizations
sqlx migrate run --source sql/migrations
error: while resolving migrations: error parsing migration filename "apply_search_tx_optimizations.sql"; expected integer version prefix (e.g. `01_foo.sql`)
error: Recipe `pg-apply-optimizations` failed on line 21 with exit code 1
Just to note that the sql scripts are also used by the mina-mesh search-tx-optimizations command (so that also would need to be adjusted):
search-tx-optimizations Command to apply or drop search transaction optimizations in the archive database.
There was a problem hiding this comment.
Oops, this requires something that is implemented on a different PR that I should've opened and merged first. Please wait for it.
|
|
||
| # Initialize PostgreSQL database | ||
| pg-init: | ||
| docker run -d --name {{DB_CONTAINER_NAME}} -p 5432:5432 -v $(pwd)/sql_scripts:/docker-entrypoint-initdb.d -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_USER=$POSTGRES_USER postgres postgres -c log_statement=all -c log_min_duration_statement=0 |
There was a problem hiding this comment.
When doing pg-init I got:
sh: 1: POSTGRES_PASSWORD: parameter not set
error: Recipe `pg-init` failed on line 12 with exit code 2
Perhaps we can add in justfile:
POSTGRES_USER := "mina"
POSTGRES_PASSWORD := "whatever"
or define it in the .env.example?
|
|
||
| # Initialize PostgreSQL database | ||
| pg-init: | ||
| docker run -d --name {{DB_CONTAINER_NAME}} -p 5432:5432 -v $(pwd)/sql_scripts:/docker-entrypoint-initdb.d -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_USER=$POSTGRES_USER postgres postgres -c log_statement=all -c log_min_duration_statement=0 |
There was a problem hiding this comment.
I'm thinking also, that we might actually define $PG_PORT in .env.example too (and re-use it here as -p $PG_PORT:5432).
I locally have a postgres running on 5432 and if I try to init pg docker environment I get a port conflict... so I need to manually change all the ports in my .env and here in order to make it work.
…plying and dropping migrations
Eliminate Deno-related configurations and scripts, replacing them with Bash scripts and a Justfile for task management. Update documentation to reflect these changes.