feat(pg-neo-migration): init

This commit is contained in:
2025-03-05 19:13:00 +00:00
parent e8e2890171
commit cc7bd6b1a2
3 changed files with 35 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,27 @@
#include <stdio.h>
#include <stdlib.h>
#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();
}
}

View File

@@ -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;