-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from gov4git/cache-layer
Improve cache layer
- Loading branch information
Showing
54 changed files
with
2,114 additions
and
992 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'gov4git-desktop-app': minor | ||
--- | ||
|
||
Improve cache layer | ||
|
||
- Cache user, communities, and settings |
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,32 @@ | ||
CREATE TABLE `communities` ( | ||
`url` text PRIMARY KEY NOT NULL, | ||
`branch` text NOT NULL, | ||
`name` text NOT NULL, | ||
`configPath` text NOT NULL, | ||
`projectUrl` text NOT NULL, | ||
`selected` integer NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE `userCommunities` ( | ||
`id` integer PRIMARY KEY NOT NULL, | ||
`userId` text NOT NULL, | ||
`communityId` text NOT NULL, | ||
`isMember` integer NOT NULL, | ||
`isMaintainer` integer NOT NULL, | ||
`votingCredits` real NOT NULL, | ||
`votingScore` real NOT NULL, | ||
FOREIGN KEY (`userId`) REFERENCES `users`(`username`) ON UPDATE no action ON DELETE no action, | ||
FOREIGN KEY (`communityId`) REFERENCES `communities`(`url`) ON UPDATE no action ON DELETE no action | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE `users` ( | ||
`username` text PRIMARY KEY NOT NULL, | ||
`pat` text NOT NULL, | ||
`memberPublicUrl` text NOT NULL, | ||
`memberPublicBranch` text NOT NULL, | ||
`memberPrivateUrl` text NOT NULL, | ||
`memberPrivateBranch` text NOT NULL | ||
); | ||
--> statement-breakpoint | ||
ALTER TABLE ballots ADD `status` text DEFAULT 'open' NOT NULL;--> statement-breakpoint | ||
CREATE UNIQUE INDEX `userCommunities_communityId_unique` ON `userCommunities` (`communityId`); |
Oops, something went wrong.