Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ Inside a directory create `trek.yaml`:
```yaml
model_name: <model_name>
db_name: <db_name>
db_users:
- <db_user_1>
- <db_user_2>
roles:
- name: db_user_1
- name: db_user_2
```

Create `<model_name>.dbm` using pgModeler.
Expand Down
Binary file modified example/foo.png
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PNG is broken somehow (no error message)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 7 additions & 23 deletions example/foo.sql
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
-- Database generated with pgModeler (PostgreSQL Database Modeler).
-- pgModeler version: 0.9.4
-- PostgreSQL version: 13.0
-- Project Site: pgmodeler.io
-- Model Author: ---
-- -- object: alice | type: ROLE --
-- -- DROP ROLE IF EXISTS alice;
-- CREATE ROLE alice WITH ;
-- -- ddl-end --
--
-- -- object: bob | type: ROLE --
-- -- DROP ROLE IF EXISTS bob;
-- CREATE ROLE bob WITH ;
-- -- ddl-end --
--
-- ** Database generated with pgModeler (PostgreSQL Database Modeler).
-- ** pgModeler version: 1.2.2
-- ** PostgreSQL version: 18.0
-- ** Project Site: pgmodeler.io
-- ** Model Author: ---

-- Database creation must be performed outside a multi lined SQL file.
-- These commands were put in this file only as a convenience.
--
-- -- object: bar | type: DATABASE --
-- -- DROP DATABASE IF EXISTS bar;
-- CREATE DATABASE bar;
-- -- ddl-end --
--
SET search_path TO pg_catalog,public;
-- ddl-end --


30 changes: 7 additions & 23 deletions example/migrations/001_init.up.sql
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
-- Database generated with pgModeler (PostgreSQL Database Modeler).
-- pgModeler version: 0.9.4
-- PostgreSQL version: 13.0
-- Project Site: pgmodeler.io
-- Model Author: ---
-- -- object: alice | type: ROLE --
-- -- DROP ROLE IF EXISTS alice;
-- CREATE ROLE alice WITH ;
-- -- ddl-end --
--
-- -- object: bob | type: ROLE --
-- -- DROP ROLE IF EXISTS bob;
-- CREATE ROLE bob WITH ;
-- -- ddl-end --
--
-- ** Database generated with pgModeler (PostgreSQL Database Modeler).
-- ** pgModeler version: 1.2.2
-- ** PostgreSQL version: 18.0
-- ** Project Site: pgmodeler.io
-- ** Model Author: ---

-- Database creation must be performed outside a multi lined SQL file.
-- These commands were put in this file only as a convenience.
--
-- -- object: bar | type: DATABASE --
-- -- DROP DATABASE IF EXISTS bar;
-- CREATE DATABASE bar;
-- -- ddl-end --
--
SET search_path TO pg_catalog,public;
-- ddl-end --


4 changes: 3 additions & 1 deletion generate-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ cd example
TREK_VERSION=latest \
TREK_MODEL_NAME=foo \
TREK_DATABASE_NAME=bar \
TREK_DATABASE_USERS=alice,bob \
TREK_ROLES=alice,bob \
go run .. init

go run .. check

go run .. generate --stdout
Loading