-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Feature release v7 sql scripts (#5757)
* sql scripts * release channel schema * script number chnage * is exposed * sql script chnage * script number chnage
- Loading branch information
1 parent
d38a408
commit 5727221
Showing
2 changed files
with
209 additions
and
0 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,3 @@ | ||
DELETE FROM devtron_resource_schema where devtron_resource_id in (select id from devtron_resource where kind in('release-channel')); | ||
|
||
DELETE FROM devtron_resource where kind in('release-channel'); |
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,206 @@ | ||
INSERT INTO devtron_resource(kind, display_name, icon,is_exposed, parent_kind_id, deleted, created_on, created_by, updated_on, | ||
updated_by) | ||
VALUES ('release-channel', 'Release Channel', '',false, 0, false, now(), 1, now(), 1); | ||
|
||
INSERT INTO devtron_resource_schema(devtron_resource_id, version, schema, sample_schema, latest, created_on, created_by, updated_on, | ||
updated_by) | ||
VALUES ((select id from devtron_resource where kind = 'release-channel'), 'alpha1', | ||
'{ | ||
"type": "object", | ||
"title": "Release Channel Schema", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"required": | ||
[ | ||
"version", | ||
"kind", | ||
"overview" | ||
], | ||
"properties": | ||
{ | ||
"kind": | ||
{ | ||
"const": "release-channel" | ||
}, | ||
"version": | ||
{ | ||
"enum": | ||
[ | ||
"alpha1" | ||
], | ||
"type": "string" | ||
}, | ||
"overview": | ||
{ | ||
"type": "object", | ||
"properties": | ||
{ | ||
"id": | ||
{ | ||
"type": "number" | ||
}, | ||
"icon": | ||
{ | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"name": | ||
{ | ||
"type": "string" | ||
}, | ||
"tags": | ||
{ | ||
"additionalProperties": | ||
{ | ||
"type": "string" | ||
} | ||
}, | ||
"idType": | ||
{ | ||
"enum": | ||
[ | ||
"resourceObjectId", | ||
"oldObjectId" | ||
], | ||
"type": "string" | ||
}, | ||
"default": | ||
{ | ||
"type": "boolean" | ||
}, | ||
"metadata": | ||
{ | ||
"type": "object", | ||
"properties": | ||
{} | ||
}, | ||
"createdBy": | ||
{ | ||
"type": "object", | ||
"refType": "#/references/users" | ||
}, | ||
"createdOn": | ||
{ | ||
"type": "string" | ||
}, | ||
"description": | ||
{ | ||
"type": "string" | ||
}, | ||
"releaseChannelId": | ||
{ | ||
"type": "string" | ||
} | ||
}, | ||
"required": | ||
[ | ||
"id", | ||
"idType", | ||
"releaseChannelId" | ||
] | ||
}, | ||
"dependencies": | ||
{ | ||
"type": "array" | ||
} | ||
} | ||
}','{ | ||
"type": "object", | ||
"title": "Release Channel Schema", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"required": | ||
[ | ||
"version", | ||
"kind", | ||
"overview" | ||
], | ||
"properties": | ||
{ | ||
"kind": | ||
{ | ||
"const": "release-channel" | ||
}, | ||
"version": | ||
{ | ||
"enum": | ||
[ | ||
"alpha1" | ||
], | ||
"type": "string" | ||
}, | ||
"overview": | ||
{ | ||
"type": "object", | ||
"properties": | ||
{ | ||
"id": | ||
{ | ||
"type": "number" | ||
}, | ||
"icon": | ||
{ | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"name": | ||
{ | ||
"type": "string" | ||
}, | ||
"tags": | ||
{ | ||
"additionalProperties": | ||
{ | ||
"type": "string" | ||
} | ||
}, | ||
"idType": | ||
{ | ||
"enum": | ||
[ | ||
"resourceObjectId", | ||
"oldObjectId" | ||
], | ||
"type": "string" | ||
}, | ||
"default": | ||
{ | ||
"type": "boolean" | ||
}, | ||
"metadata": | ||
{ | ||
"type": "object", | ||
"properties": | ||
{} | ||
}, | ||
"createdBy": | ||
{ | ||
"type": "object", | ||
"refType": "#/references/users" | ||
}, | ||
"createdOn": | ||
{ | ||
"type": "string" | ||
}, | ||
"description": | ||
{ | ||
"type": "string" | ||
}, | ||
"releaseChannelId": | ||
{ | ||
"type": "string" | ||
} | ||
}, | ||
"required": | ||
[ | ||
"id", | ||
"idType", | ||
"releaseChannelId" | ||
] | ||
}, | ||
"dependencies": | ||
{ | ||
"type": "array" | ||
} | ||
} | ||
}',true, now(), 1, now(), 1); | ||
|
||
|