Skip to content

Commit

Permalink
Feature: Support store Policy - SQL scheme (#234)
Browse files Browse the repository at this point in the history
* fix: stop/start runner to use the dev compose

Signed-off-by: Kairo Araujo <[email protected]>

* build: Include the generate as part of migrations

Include the `go generate ./...` in the db migrations steps

`make db-migrations` now generates the ent files from schemes.

Signed-off-by: Kairo Araujo <[email protected]>

* feat: Implements the basic schema for Policy

Adds the basic schema for the policy

Signed-off-by: Kairo Araujo <[email protected]>

* fixup! feat: Implements the basic schema for Policy

Signed-off-by: Kairo Araujo <[email protected]>

* feat: generate & migrations for policy

This commit includes the db generate for policy and the db migrations
`make db-migrations`

Signed-off-by: Kairo Araujo <[email protected]>

---------

Signed-off-by: Kairo Araujo <[email protected]>
  • Loading branch information
Kairo Araujo authored Apr 18, 2024
1 parent 5acbb6e commit 84b08c0
Show file tree
Hide file tree
Showing 45 changed files with 5,280 additions and 1,136 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ run-dev: ## Run the dev server

.PHONY: stop
stop: ## Stop the dev server
@docker-compose down -v
@docker-compose -f compose-dev.yml down -v


.PHONY: clean
clean: ## Clean up the dev server
$(MAKE) stop
@docker compose rm --force
@docker compose -f compose-dev.yml rm --force
@docker rmi archivista-archivista --force


Expand All @@ -56,6 +56,7 @@ docs: ## Generate swagger docs

.PHONY: db-migrations
db-migrations: ## Run the migrations for the database
@go generate ./...
@atlas migrate diff mysql --dir "file://ent/migrate/migrations/mysql" --to "ent://ent/schema" --dev-url "docker://mysql/8/dev"
@atlas migrate diff pgsql --dir "file://ent/migrate/migrations/pgsql" --to "ent://ent/schema" --dev-url "docker://postgres/16/dev?search_path=public"

Expand Down
Loading

0 comments on commit 84b08c0

Please sign in to comment.