Skip to content
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

feat: migration files for the database schema #33

Conversation

gentlementlegen
Copy link
Member

Resolves ubiquity/ubiquibot#919

It is done in this repository as the issue was opened in the old Ubiquibot repo which should not be relevant soon. The schema is a copy of the one currently used by wfzpewmlyiozupulbuur Supabase project.

The changes are already applied in the database, these migrations just reflect its current state.

Copy link
Contributor

Unused dependencies (4)

Filename dependencies
package.json @octokit/webhooks-types
create-cloudflare
octokit
universal-github-app-jwt

Unused devDependencies (4)

Filename devDependencies
package.json @mswjs/data
esbuild
eslint-config-prettier
eslint-plugin-prettier

Unlisted dependencies (9)

Filename unlisted
src/github/github-client.ts @octokit/core
@octokit/types
@octokit/plugin-paginate-rest
@octokit/plugin-rest-endpoint-methods
@octokit/plugin-retry
@octokit/plugin-throttling
@octokit/auth-app
src/github/github-event-handler.ts @octokit/auth-app
src/github/utils/config.ts yaml

Unlisted binaries (5)

Filename binaries
package.json lsof
awk
.github/workflows/build.yml build
.github/workflows/bun-testing.yml i
.github/workflows/cspell.yml format:cspell

@gentlementlegen gentlementlegen marked this pull request as ready for review March 13, 2024 11:45
@whilefoo
Copy link
Contributor

Every plugin will have its own DB and the kernel just calls plugins so it doesn't need any DB

@gentlementlegen
Copy link
Member Author

Every plugin will have its own DB and the kernel just calls plugins so it doesn't need any DB

@whilefoo Understood, then what will happen with the current db, plain delete?
We can close this PR and just validate the issue as completed if you want, changes are already applied on the db side.

@0x4007
Copy link
Member

0x4007 commented Mar 13, 2024

The only useful data from the current database isn't really even worth migrating. It's just the wallet data. Instead we can just force everybody to re-register.

However we may also need to figure some type of standardized way to bus data from plugins to other plugins.

For example:

Wallet registration plugin /wallet stores wallets

Permit generation requires wallet data.

Technically we could make it the same plugin with two different intended entry points though. One for the slash command (comment created event) and then one to generate permits (invoked as part of a chain of other plugins, originally from issue closed as complete)

This might be the easiest way forward in the short term. In the longer term we can probably take inspiration from how Amazon web services was formed. Basically leadership forced the team to build internal systems with standardized modules and interfaces. Then they made those interfaces public.

@rndquu
Copy link
Member

rndquu commented Mar 14, 2024

This PR corresponds to 2 bot plugins:

I don't want to close this PR without merging since these DB migrations will eventually end up in plugins' DB instances. I think the best thing we can do right now is to merge this PR into the old bot's instance at https://github.com/ubiquity/ubiquibot

@gentlementlegen
Copy link
Member Author

This PR corresponds to 2 bot plugins:

I don't want to close this PR without merging since these DB migrations will eventually end up in plugins' DB instances. I think the best thing we can do right now is to merge this PR into the old bot's instance at https://github.com/ubiquity/ubiquibot

I am fine with that, I will move the PR to the other repository.

@gentlementlegen
Copy link
Member Author

Pull request moved to ubiquity/ubiquibot#923

@gentlementlegen gentlementlegen deleted the feat/supabase-migrations branch March 17, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup RLS and CLS for supabase
4 participants