-
-
Notifications
You must be signed in to change notification settings - Fork 10
chore: merge dev to main
#52
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
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d34d3a5
feat(bots/discord): auto migrate database schema
PalmDevs 18a119f
feat(bots/discord): add remind/unremind command (#51)
oSumAtrIX d9754f2
chore(release): 1.6.0-dev.1 [skip ci]
semantic-release-bot f24a8fb
fix(bots/discord): add missing database migration file
PalmDevs 99c7422
feat(bots/discord/database/schemas): add indexes on reminders
PalmDevs 26680a9
fix(bots/discord): off-by-one reminders query + log if query fails
PalmDevs 13c48d5
chore(release): 1.6.0-dev.2 [skip ci]
semantic-release-bot 1f1dd74
fix(bots/discord): add min max intervals in `remind` command
PalmDevs a94fd74
fix(bots/discord): throw error if nothing inserted during adding remi…
PalmDevs cafdbc0
fix(bots/discord/database/schemas): index instead of unique index on …
PalmDevs b519b56
fix(bots/discord): require roles for using utility commands
PalmDevs 9ba040f
chore(release): 1.6.0-dev.3 [skip ci]
semantic-release-bot 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 hidden or 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,18 @@ | ||
| CREATE TABLE `applied_presets` ( | ||
| `member` text NOT NULL, | ||
| `guild` text NOT NULL, | ||
| `roles` text DEFAULT '[]' NOT NULL, | ||
| `preset` text NOT NULL, | ||
| `until` integer | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE UNIQUE INDEX `unique_composite` ON `applied_presets` (`member`,`preset`,`guild`);--> statement-breakpoint | ||
| CREATE TABLE `responses` ( | ||
| `reply` text PRIMARY KEY NOT NULL, | ||
| `channel` text NOT NULL, | ||
| `guild` text NOT NULL, | ||
| `ref` text NOT NULL, | ||
| `label` text NOT NULL, | ||
| `text` text NOT NULL, | ||
| `by` text | ||
| ); | ||
This file contains hidden or 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,12 @@ | ||
| CREATE TABLE `reminders` ( | ||
| `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
| `creator` text NOT NULL, | ||
| `target` text NOT NULL, | ||
| `guild` text NOT NULL, | ||
| `channel` text NOT NULL, | ||
| `message` text NOT NULL, | ||
| `created_at` integer NOT NULL, | ||
| `remind_at` integer NOT NULL, | ||
| `interval_seconds` integer NOT NULL, | ||
| `count` integer DEFAULT 0 NOT NULL | ||
| ); |
This file contains hidden or 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,2 @@ | ||
| CREATE UNIQUE INDEX `reminders_remind_at_idx` ON `reminders` (`remind_at`);--> statement-breakpoint | ||
| CREATE UNIQUE INDEX `reminders_creator_guild_idx` ON `reminders` (`creator`,`guild`); |
This file contains hidden or 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,4 @@ | ||
| DROP INDEX `reminders_remind_at_idx`;--> statement-breakpoint | ||
| DROP INDEX `reminders_creator_guild_idx`;--> statement-breakpoint | ||
| CREATE INDEX `reminders_remind_at_idx` ON `reminders` (`remind_at`);--> statement-breakpoint | ||
| CREATE INDEX `reminders_creator_guild_idx` ON `reminders` (`creator`,`guild`); |
This file contains hidden or 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,133 @@ | ||
| { | ||
| "version": "6", | ||
| "dialect": "sqlite", | ||
| "id": "81c6e9da-4d03-4d2f-9934-1a6cf376dd6e", | ||
| "prevId": "00000000-0000-0000-0000-000000000000", | ||
| "tables": { | ||
| "applied_presets": { | ||
| "name": "applied_presets", | ||
| "columns": { | ||
| "member": { | ||
| "name": "member", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "guild": { | ||
| "name": "guild", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "roles": { | ||
| "name": "roles", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false, | ||
| "default": "'[]'" | ||
| }, | ||
| "preset": { | ||
| "name": "preset", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "until": { | ||
| "name": "until", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": false, | ||
| "autoincrement": false | ||
| } | ||
| }, | ||
| "indexes": { | ||
| "unique_composite": { | ||
| "name": "unique_composite", | ||
| "columns": [ | ||
| "member", | ||
| "preset", | ||
| "guild" | ||
| ], | ||
| "isUnique": true | ||
| } | ||
| }, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "checkConstraints": {} | ||
| }, | ||
| "responses": { | ||
| "name": "responses", | ||
| "columns": { | ||
| "reply": { | ||
| "name": "reply", | ||
| "type": "text", | ||
| "primaryKey": true, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "channel": { | ||
| "name": "channel", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "guild": { | ||
| "name": "guild", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "ref": { | ||
| "name": "ref", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "label": { | ||
| "name": "label", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "text": { | ||
| "name": "text", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "by": { | ||
| "name": "by", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": false, | ||
| "autoincrement": false | ||
| } | ||
| }, | ||
| "indexes": {}, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "checkConstraints": {} | ||
PalmDevs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| }, | ||
| "views": {}, | ||
| "enums": {}, | ||
| "_meta": { | ||
| "schemas": {}, | ||
| "tables": {}, | ||
| "columns": {} | ||
| }, | ||
| "internal": { | ||
| "indexes": {} | ||
| } | ||
| } | ||
This file contains hidden or 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,214 @@ | ||
| { | ||
| "version": "6", | ||
| "dialect": "sqlite", | ||
| "id": "ea0c4e69-ffe0-45f8-81cc-aefc1c696751", | ||
| "prevId": "81c6e9da-4d03-4d2f-9934-1a6cf376dd6e", | ||
| "tables": { | ||
| "applied_presets": { | ||
| "name": "applied_presets", | ||
| "columns": { | ||
| "member": { | ||
| "name": "member", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "guild": { | ||
| "name": "guild", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "roles": { | ||
| "name": "roles", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false, | ||
| "default": "'[]'" | ||
| }, | ||
| "preset": { | ||
| "name": "preset", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "until": { | ||
| "name": "until", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": false, | ||
| "autoincrement": false | ||
| } | ||
| }, | ||
| "indexes": { | ||
| "unique_composite": { | ||
| "name": "unique_composite", | ||
| "columns": [ | ||
| "member", | ||
| "preset", | ||
| "guild" | ||
| ], | ||
| "isUnique": true | ||
| } | ||
| }, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "checkConstraints": {} | ||
| }, | ||
| "reminders": { | ||
| "name": "reminders", | ||
| "columns": { | ||
| "id": { | ||
| "name": "id", | ||
| "type": "integer", | ||
| "primaryKey": true, | ||
| "notNull": true, | ||
| "autoincrement": true | ||
| }, | ||
| "creator": { | ||
| "name": "creator", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "target": { | ||
| "name": "target", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "guild": { | ||
| "name": "guild", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "channel": { | ||
| "name": "channel", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "message": { | ||
| "name": "message", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "created_at": { | ||
| "name": "created_at", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "remind_at": { | ||
| "name": "remind_at", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "interval_seconds": { | ||
| "name": "interval_seconds", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "count": { | ||
| "name": "count", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false, | ||
| "default": 0 | ||
| } | ||
| }, | ||
| "indexes": {}, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "checkConstraints": {} | ||
| }, | ||
| "responses": { | ||
| "name": "responses", | ||
| "columns": { | ||
| "reply": { | ||
| "name": "reply", | ||
| "type": "text", | ||
| "primaryKey": true, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "channel": { | ||
| "name": "channel", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "guild": { | ||
| "name": "guild", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "ref": { | ||
| "name": "ref", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "label": { | ||
| "name": "label", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "text": { | ||
| "name": "text", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true, | ||
| "autoincrement": false | ||
| }, | ||
| "by": { | ||
| "name": "by", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": false, | ||
| "autoincrement": false | ||
| } | ||
| }, | ||
| "indexes": {}, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "checkConstraints": {} | ||
| } | ||
| }, | ||
| "views": {}, | ||
| "enums": {}, | ||
| "_meta": { | ||
| "schemas": {}, | ||
| "tables": {}, | ||
| "columns": {} | ||
| }, | ||
| "internal": { | ||
| "indexes": {} | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.