-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database triggers #4860
Open
dieriba
wants to merge
57
commits into
main
Choose a base branch
from
database_triggers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,321
−429
Open
Database triggers #4860
Changes from 48 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
6315ace
feat: init database triggers
dieriba 3a41d0c
Merge branch 'main' into database_triggers
dieriba aa298c8
feat: :sparkles: wip: database_triggers
dieriba 80cc8e0
feat: :sparkles: add database triggers front view
dieriba 3e367e4
feat: :construction: database_triggers
dieriba c70ca15
feat: :construction: add definition in yaml, updated backend code and…
dieriba 68c3a3c
feat: :construction: updated migration file, update openapi.yml, upda…
dieriba bc3e19b
fix: struct rust
dieriba 9a1ad78
feat: :construction: update migrate, database trigger backend functio…
dieriba fa456db
feat: :construction: add resource picker front, update backend function
dieriba cdb272c
feat: :construction: edit inner database inner, update triggers
dieriba 3cdf0a2
feat: :construction: database_triggers
dieriba fabe469
feat: :construction: update openapi yaml, prettied websocker trigger
dieriba 64e9938
feat: :construction: database_triggers
dieriba cdfad9c
feat: :construction: add resource module, update variable file, worki…
dieriba 378b3ed
feat: :bug: working sqlx query
dieriba 7300370
feat: :construction: fix query with sqlx, added main loop
dieriba 9751ffe
feat: :construction: add new column database_trigg
dieriba 939e4a1
feat: :passport_control: run jobs works
dieriba 716c18e
feat: :construction: handling slot name and replication
dieriba 8b8a3e7
feat: restructring triggers, decoding trigger message on work
dieriba a864b03
feat: :construction: database_trigger
dieriba 18b96cc
feat: :construction:
dieriba 23d942c
feat: :construction: converter done, work on custom script
dieriba da4264e
feat: :construction: multiple trigger
dieriba 51c807a
feat: :construction: adding new argument function
dieriba 0928c8e
feat: :construction: database_trigger
dieriba f8814a1
feat: :construction: add generate template for front, update script p…
dieriba e41965a
feat: :construction: template script fix bug, work on restructing bac…
dieriba 0215d5a
feat: :construction: update autogenerated script, add persistence sta…
dieriba d85e25f
feat: :construction: update structure client
dieriba 5813063
feat: :construction: rewrited crud function
dieriba 86877af
feat: :construction: added publication handler
dieriba 69dcf6d
feat: :construction: new ui finished
dieriba c0f624a
feat: :construction: added slot function hanlder finish front ux
dieriba c1b5c6d
feat: :sparkles: ux improvement done, backend logic done
dieriba 351a6b7
feat: :bug: fix where clause
dieriba 7cb0b6c
Merge branch 'main' into database_triggers
dieriba 348922d
feat:
dieriba 7011cda
feat:
dieriba e431b28
chore: update .sqlx and remove empty package
dieriba 8d46b20
Merge branch 'main' into database_triggers
dieriba c30d032
fix: update publication and remove unneccessary print
dieriba f85ec3f
feat: finish converter to json, remove save button, remove unused crate
dieriba 01b6ff3
feat: update migration for database trigger, fixed query, fixed front…
dieriba 230034b
chore: update .sqlx
dieriba a0ca315
Merge branch 'main' into database_triggers
dieriba eaf47f5
chore: update sqlx
dieriba da30536
chore: .sqlx
dieriba 66e305d
chore: add unused
dieriba 681f193
Merge branch 'main' into database_triggers
dieriba 4c05214
fix: use right database resource in back and front
dieriba d183b59
Merge branch 'main' into database_triggers
dieriba b44263c
fix build
HugoCasa c26c0f8
Merge remote-tracking branch 'origin/main' into database_triggers
HugoCasa 81d3ec8
refactor:
dieriba beed5fd
fix sqlx
HugoCasa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"python.analysis.typeCheckingMode": "basic", | ||
"rust-analyzer.linkedProjects": ["./windmill-common/Cargo.toml"], | ||
"rust-analyzer.showUnlinkedFileNotification": false | ||
"rust-analyzer.showUnlinkedFileNotification": false, | ||
"conventionalCommits.scopes": [ | ||
"restructring triggers, decoding trigger message on work" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Add down migration script here | ||
DROP TABLE IF EXISTS database_trigger; | ||
DROP TYPE IF EXISTS transaction; |
20 changes: 20 additions & 0 deletions
20
backend/migrations/20241123152203_database_triggers.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,20 @@ | ||
-- Add up migration script here | ||
CREATE TYPE transaction AS ENUM ('Insert', 'Update', 'Delete'); | ||
dieriba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CREATE TABLE database_trigger( | ||
path VARCHAR(255) NOT NULL, | ||
script_path VARCHAR(255) NOT NULL, | ||
is_flow BOOLEAN NOT NULL, | ||
workspace_id VARCHAR(50) NOT NULL, | ||
edited_by VARCHAR(50) NOT NULL, | ||
email VARCHAR(255) NOT NULL, | ||
edited_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), | ||
extra_perms JSONB NULL, | ||
database_resource_path VARCHAR(255) NOT NULL, | ||
error TEXT NULL, | ||
server_id VARCHAR(50) NULL, | ||
last_server_ping TIMESTAMPTZ NULL, | ||
replication_slot_name VARCHAR(255) NOT NULL, | ||
publication_name VARCHAR(255) NOT NULL, | ||
enabled BOOLEAN NOT NULL, | ||
CONSTRAINT PK_database_trigger PRIMARY KEY (path,workspace_id) | ||
dieriba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
); |
Empty file.
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why they use this specific version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it implement postgres copy both query which is needed to make the logical replication protocol works