feat: Update database models and DTOs to use bytea for ULIDWrapper and add JWT configuration to environment
This commit is contained in:
+31
-1
@@ -1,4 +1,3 @@
|
||||
|
||||
# Time Tracker Backend Makefile
|
||||
|
||||
.PHONY: db-start db-stop db-test model-test run build clean migrate seed help
|
||||
@@ -24,6 +23,8 @@ help:
|
||||
@echo " make clean - Remove build artifacts"
|
||||
@echo " make migrate - Run database migrations"
|
||||
@echo " make seed - Seed the database with initial data"
|
||||
@echo " make db-drop-users - Drop the users table"
|
||||
@echo " make db-reinit - Re-initialize the database"
|
||||
@echo " make help - Show this help message"
|
||||
|
||||
# Start the database
|
||||
@@ -76,3 +77,32 @@ seed:
|
||||
@echo "Seeding the database..."
|
||||
@go run -mod=mod cmd/seed/main.go
|
||||
@echo "Seeding complete"
|
||||
|
||||
# Drop the users table
|
||||
db-drop-users:
|
||||
@echo "Dropping the users table..."
|
||||
@export PG_HOST=$(DB_HOST); export PG_PORT=$(DB_PORT); export PG_USER=$(DB_USER); export PG_PASSWORD=$(DB_PASSWORD); export PG_DBNAME=$(DB_NAME); go run cmd/dbtest/main.go -drop_table=users
|
||||
@echo "Users table dropped"
|
||||
|
||||
# Re-initialize the database
|
||||
db-reinit:
|
||||
@echo "Re-initializing the database..."
|
||||
@PG_HOST=$(DB_HOST) PG_PORT=$(DB_PORT) PG_USER=$(DB_USER) PG_PASSWORD=$(DB_PASSWORD) PG_DBNAME=$(DB_NAME) go run cmd/migrate/main.go -create_db -drop_db
|
||||
@echo "Database re-initialized"
|
||||
|
||||
help:
|
||||
@echo "Time Tracker Backend Makefile"
|
||||
@echo ""
|
||||
@echo "Usage:"
|
||||
@echo " make db-start - Start the PostgreSQL database container"
|
||||
@echo " make db-stop - Stop the PostgreSQL database container"
|
||||
@echo " make db-test - Test the database connection"
|
||||
@echo " make model-test - Test the database models"
|
||||
@echo " make run - Run the application"
|
||||
@echo " make build - Build the application"
|
||||
@echo " make clean - Remove build artifacts"
|
||||
@echo " make migrate - Run database migrations"
|
||||
@echo " make seed - Seed the database with initial data"
|
||||
@echo " make db-drop-users - Drop the users table"
|
||||
@echo " make db-reinit - Re-initialize the database"
|
||||
@echo " make help - Show this help message"
|
||||
|
||||
Reference in New Issue
Block a user