|
334 | 334 | chmod +x $out/bin/start-postgres-server
|
335 | 335 | '';
|
336 | 336 |
|
337 |
| - # Start a version of the client. |
338 |
| - start-client = pkgs.runCommand "start-postgres-client" { } '' |
339 |
| - mkdir -p $out/bin |
340 |
| - substitute ${./nix/tools/run-client.sh.in} $out/bin/start-postgres-client \ |
341 |
| - --subst-var-by 'PGSQL_DEFAULT_PORT' '${pgsqlDefaultPort}' \ |
342 |
| - --subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \ |
343 |
| - --subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' |
344 |
| - chmod +x $out/bin/start-postgres-client |
345 |
| - ''; |
346 |
| - |
347 | 337 | # Start a version of the client and runs migrations script on server.
|
348 |
| - start-client-and-migrate = |
| 338 | + start-client = |
349 | 339 | let
|
350 | 340 | migrationsDir = ./migrations/db;
|
351 | 341 | postgresqlSchemaSql = ./nix/tools/postgresql_schema.sql;
|
352 | 342 | pgbouncerAuthSchemaSql = ./ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql;
|
353 | 343 | statExtensionSql = ./ansible/files/stat_extension.sql;
|
354 | 344 | in
|
355 |
| - pkgs.runCommand "start-postgres-client-migrate" { } '' |
| 345 | + pkgs.runCommand "start-postgres-client" { } '' |
356 | 346 | mkdir -p $out/bin
|
357 |
| - substitute ${./nix/tools/run-client-migrate.sh.in} $out/bin/start-postgres-client-migrate \ |
| 347 | + substitute ${./nix/tools/run-client.sh.in} $out/bin/start-postgres-client \ |
358 | 348 | --subst-var-by 'PGSQL_DEFAULT_PORT' '${pgsqlDefaultPort}' \
|
359 | 349 | --subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \
|
360 | 350 | --subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' \
|
361 | 351 | --subst-var-by 'MIGRATIONS_DIR' '${migrationsDir}' \
|
362 | 352 | --subst-var-by 'POSTGRESQL_SCHEMA_SQL' '${postgresqlSchemaSql}' \
|
363 | 353 | --subst-var-by 'PGBOUNCER_AUTH_SCHEMA_SQL' '${pgbouncerAuthSchemaSql}' \
|
364 | 354 | --subst-var-by 'STAT_EXTENSION_SQL' '${statExtensionSql}'
|
365 |
| - chmod +x $out/bin/start-postgres-client-migrate |
| 355 | + chmod +x $out/bin/start-postgres-client |
366 | 356 | '';
|
367 | 357 |
|
368 | 358 | # Migrate between two data directories.
|
|
517 | 507 | {
|
518 | 508 | start-server = mkApp "start-server" "start-postgres-server";
|
519 | 509 | start-client = mkApp "start-client" "start-postgres-client";
|
520 |
| - start-client-and-migrate = mkApp "start-client-and-migrate" "start-postgres-client-migrate"; |
521 | 510 | start-replica = mkApp "start-replica" "start-postgres-replica";
|
522 | 511 | migration-test = mkApp "migrate-tool" "migrate-postgres";
|
523 | 512 | sync-exts-versions = mkApp "sync-exts-versions" "sync-exts-versions";
|
|
0 commit comments