This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add database_documentation and improve schema patch doc.
Co-authored-by: chr-schr <[email protected]>
- Loading branch information
Showing
7 changed files
with
72 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
[print_schema] | ||
file = "src/schema.rs" | ||
patch_file = "src/schema.patch" | ||
with_docs = "only-database-comments" | ||
|
||
filter = { except_tables = ["spatial_ref_sys"] } | ||
import_types = ["postgis_diesel::sql_types::Geography", "diesel::sql_types::*"] | ||
import_types = [ | ||
"postgis_diesel::sql_types::Geography", | ||
"postgis_diesel::sql_types::Geometry", | ||
] |
5 changes: 5 additions & 0 deletions
5
backend/migrations/99999999999999_database_documentation/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
COMMENT ON DATABASE permaplant IS NULL; | ||
|
||
-- | ||
-- Don't alter the database schema in this file. | ||
-- |
19 changes: 19 additions & 0 deletions
19
backend/migrations/99999999999999_database_documentation/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- | ||
-- Only add database comments in this migration. | ||
-- | ||
|
||
COMMENT ON TABLE layers IS 'The layers of a map'; | ||
|
||
COMMENT ON COLUMN layers.name IS 'The name of the layer | ||
Example: "Base Layer"'; | ||
|
||
COMMENT ON COLUMN layers.type IS 'The type of the layer (ENUM layer_type) | ||
Examples: base, plants, shade, ...'; | ||
|
||
COMMENT ON COLUMN layers.type IS 'Whether the layer was created by the user as an alternative to a pre-existing layer'; | ||
|
||
|
||
|
||
|
||
|
||
COMMENT ON COLUMN plantings.id IS 'This is generated by the frontend'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters