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

refactor: change default quotas to unlimited for organizations #3720

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = function(knex) {
return knex.schema
.raw(`ALTER TABLE organization ALTER quota_route SET DEFAULT -1;`)
.raw(`ALTER TABLE organization ALTER quota_project SET DEFAULT -1;`)
.raw(`ALTER TABLE organization ALTER quota_group SET DEFAULT -1;`)
.raw(`ALTER TABLE organization ALTER quota_notification SET DEFAULT -1;`)
.raw(`ALTER TABLE organization ALTER quota_environment SET DEFAULT -1;`)
.alterTable('organization', function (table) {
table.timestamp('created').defaultTo(knex.fn.now());
})
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = function(knex) {
return knex.schema
.raw(`ALTER TABLE organization ALTER quota_route SET DEFAULT 5;`)
.raw(`ALTER TABLE organization ALTER quota_project SET DEFAULT 1;`)
.raw(`ALTER TABLE organization ALTER quota_group SET DEFAULT 10;`)
.raw(`ALTER TABLE organization ALTER quota_notification SET DEFAULT 10;`)
.raw(`ALTER TABLE organization ALTER quota_environment SET DEFAULT 5;`)
.alterTable('organization', (table) => {
table.dropColumn('created');
})
};
1 change: 1 addition & 0 deletions services/api/src/typeDefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,7 @@ const typeDefs = gql`
groups: [OrgGroupInterface]
owners: [OrgUser]
notifications(type: NotificationType): [Notification]
created: String
}
input AddOrganizationInput {
Expand Down