-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/communities #10
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
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7436826
✏️ chore: create communities table
iiivanpopov f09bb6b
🎨 feat: create community
iiivanpopov 3dfe2c4
🚚 refactor
iiivanpopov ced7b8b
🤘 feat: delete community
iiivanpopov 2baf2f3
🔒 feat: create invitation
iiivanpopov 0aed664
❤️ refactor
iiivanpopov 2e5131a
🚚 fix(google ouath): use correct ua
iiivanpopov 0efe457
🚀 refactor: tables
iiivanpopov fcd8146
fix: inconsistent file naming
iiivanpopov 4f5c818
Merge pull request #9 from iiivanpopov/refactor/db
iiivanpopov 891f16f
🥵 chore: rename file
iiivanpopov 5e11031
❤️ feat: update community
iiivanpopov deca881
add invitation->community relation
iiivanpopov 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 |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| bun run test | ||
| bun test | ||
| bun lint-staged | ||
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
10 changes: 0 additions & 10 deletions
10
backend/drizzle/20251230205121_perpetual_captain_britain/migration.sql
This file was deleted.
Oops, something went wrong.
122 changes: 0 additions & 122 deletions
122
backend/drizzle/20251230205121_perpetual_captain_britain/snapshot.json
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
backend/drizzle/20260101190033_fantastic_spectrum/migration.sql
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,37 @@ | ||
| CREATE TABLE `communities` ( | ||
| `id` integer PRIMARY KEY AUTOINCREMENT, | ||
| `owner_id` integer NOT NULL, | ||
| `name` text NOT NULL, | ||
| `created_at` integer DEFAULT (unixepoch()) NOT NULL, | ||
| CONSTRAINT `fk_communities_owner_id_users_id_fk` FOREIGN KEY (`owner_id`) REFERENCES `users`(`id`) | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE `community_members` ( | ||
| `id` integer PRIMARY KEY AUTOINCREMENT, | ||
| `community_id` integer NOT NULL, | ||
| `user_id` integer NOT NULL, | ||
| `role` text DEFAULT 'member' NOT NULL, | ||
| `created_at` integer DEFAULT (unixepoch()) NOT NULL, | ||
| CONSTRAINT `fk_community_members_community_id_communities_id_fk` FOREIGN KEY (`community_id`) REFERENCES `communities`(`id`) ON DELETE CASCADE, | ||
| CONSTRAINT `fk_community_members_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE `invitation_links` ( | ||
| `id` integer PRIMARY KEY AUTOINCREMENT, | ||
| `community_id` integer NOT NULL, | ||
| `link` text NOT NULL UNIQUE, | ||
| `expires_at` integer, | ||
| `created_at` integer DEFAULT (unixepoch()) NOT NULL, | ||
| CONSTRAINT `fk_invitation_links_community_id_communities_id_fk` FOREIGN KEY (`community_id`) REFERENCES `communities`(`id`) ON DELETE CASCADE | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE `users` ( | ||
| `id` integer PRIMARY KEY AUTOINCREMENT, | ||
| `name` text, | ||
| `username` text NOT NULL UNIQUE, | ||
| `email` text NOT NULL UNIQUE, | ||
| `email_confirmed` integer DEFAULT false NOT NULL, | ||
| `password_hash` text NOT NULL, | ||
| `created_at` integer DEFAULT (unixepoch()) NOT NULL, | ||
| `updated_at` integer DEFAULT (unixepoch()) NOT NULL | ||
| ); |
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.
The test script has been removed from package.json at the root level but the pre-commit hook still references 'bun test'. While 'bun test' will still work (it's a built-in Bun command), this creates an inconsistency in how tests are run. Consider either keeping the test script for consistency or documenting why it was removed.