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.
757 sql reformatting finetune sqlfluff (#765)
closes #757 <!-- Check relevant points but **please do not remove entries**. --> ## Basics <!-- These points need to be fulfilled for every PR. --> - [x] I added a line to [/doc/CHANGELOG.md](/doc/CHANGELOG.md) - [x] The PR is rebased with current master. - [x] Details of what you changed are in commit messages. - [x] References to issues, e.g. `close #X`, are in the commit messages. - [ ] The buildserver is happy. <!-- If you have any troubles fulfilling these criteria, please write about the trouble as comment in the PR. We will help you, but we cannot accept PRs that do not fulfill the basics. --> ## Checklist <!-- For documentation fixes, spell checking, and similar none of these points below need to be checked. Otherwise please check these points when getting a PR done: --> - [x] I have installed and I am using [pre-commit hooks](../doc/contrib/README.md#Hooks) - [ ] I fully described what my PR does in the documentation (not in the PR description) - [ ] I fixed all affected documentation - [ ] I fixed the introduction tour - [x] I wrote migrations in a way that they are compatible with already present data - [x] I fixed all affected decisions - [ ] I added unit tests for my code - [ ] I added code comments, logging, and assertions as appropriate - [ ] I translated all strings visible to the user - [ ] I mentioned [every code or binary](https://github.com/ElektraInitiative/PermaplanT/blob/master/.reuse/dep5) not directly written or done by me in [reuse syntax](https://reuse.software/) - [ ] I created left-over issues for things that are still to be done - [x] Code is conforming to [our Architecture](/doc/architecture) - [x] Code is conforming to [our Guidelines](/doc/guidelines) (exceptions are documented) - [x] Code is consistent to [our Design Decisions](/doc/decisions) ## Review <!-- Reviewers can copy&check the following to their review. Also the checklist above can be used. But also the PR creator should check these points when getting a PR done: --> - [ ] I've tested the code - [ ] I've read through the whole code - [ ] Examples are well chosen and understandable
- Loading branch information
Showing
27 changed files
with
684 additions
and
680 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
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
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
8 changes: 0 additions & 8 deletions
8
...ple_migrations/normalized-plants-and-ranks/2023-04-07-130215_plant_relationships/down.sql
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...s/normalized-plants-and-ranks/2023-04-07-130215_plant_relationships/down.sql.md
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,8 @@ | ||
DROP TABLE plant_relationships; | ||
DROP TYPE relationship_kind; | ||
ALTER TABLE plants | ||
DROP COLUMN family_id, | ||
DROP COLUMN subfamily_id, | ||
DROP COLUMN genus_id, | ||
DROP COLUMN species_id; | ||
DROP TYPE taxonomic_rank; |
17 changes: 0 additions & 17 deletions
17
...ample_migrations/normalized-plants-and-ranks/2023-04-07-130215_plant_relationships/up.sql
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...ons/normalized-plants-and-ranks/2023-04-07-130215_plant_relationships/up.sql.md
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,16 @@ | ||
CREATE TYPE taxonomic_rank AS ENUM ('family', 'subfamily', 'genus', 'species', 'variety'); | ||
ALTER TABLE plants | ||
ADD COLUMN rank TAXONOMIC_RANK NOT NULL, | ||
ADD COLUMN family_id INTEGER REFERENCES plants (id) NULL, | ||
ADD COLUMN subfamily_id INTEGER REFERENCES plants (id) NULL, | ||
ADD COLUMN genus_id INTEGER REFERENCES plants (id) NULL, | ||
ADD COLUMN species_id INTEGER REFERENCES plants (id) NULL; | ||
|
||
CREATE TYPE relationship_kind AS ENUM ('companion', 'antagonist', 'neutral'); | ||
CREATE TABLE plant_relationships ( | ||
id SERIAL PRIMARY KEY NOT NULL, | ||
confidence INTEGER CHECK (confidence >= 0) NOT NULL, | ||
kind relationship_kind NOT NULL, | ||
left_plant_id INTEGER REFERENCES plants (id) NOT NULL, | ||
right_plant_id INTEGER REFERENCES plants (id) NOT NULL | ||
); |
Oops, something went wrong.