diff --git a/package/postgres/pg-neo-migration/hectic-chan b/package/postgres/pg-neo-migration/hectic-chan new file mode 100755 index 0000000..deef93d Binary files /dev/null and b/package/postgres/pg-neo-migration/hectic-chan differ diff --git a/package/postgres/pg-neo-migration/src/main.c b/package/postgres/pg-neo-migration/src/main.c new file mode 100644 index 0000000..6883f23 --- /dev/null +++ b/package/postgres/pg-neo-migration/src/main.c @@ -0,0 +1,27 @@ +#include +#include +#include "type.c" + +LogLevel currentLogLevel = LOG_LEVEL_DEBUG; + +// TODO: check on the specific psql version +int check_psql_installed(void) { + int returned = system("psql --version > /dev/null 2>&1"); + if (returned != 0) { + fprintf(stderr, "Error: psql is not installed or not in PATH.\n"); + return 1; + } + return 0; +} + +void help_message() { + fprintf(stdout, "Usage: TODO"); +} + +int main(int argc, char *argv[]) { + if (!check_psql_installed()) { exit(1); } + + if (argc < 2) { + help_message(); + } +} diff --git a/package/postgres/pg-neo-migration/src/type.c b/package/postgres/pg-neo-migration/src/type.c new file mode 100644 index 0000000..722deb0 --- /dev/null +++ b/package/postgres/pg-neo-migration/src/type.c @@ -0,0 +1,8 @@ +typedef enum { + LOG_LEVEL_DEBUG, + LOG_LEVEL_LOG, + LOG_LEVEL_INFO, + LOG_LEVEL_NOTICE, + LOG_LEVEL_WARN, + LOG_LEVEL_EXCEPTION +} LogLevel;