import { Knex } from "knex"; import {CDM_CORE_SCHEMA} from "../../../utils/globals" export function up(knex: Knex): Promise { return knex.schema.raw(`INSERT INTO "${CDM_CORE_SCHEMA}"."BusinessApp" ("Id", "TenantId", "CreatedAt", "DescriptorSchemaId", "DescriptorSchemaVersion", "Descriptor", "InstanceId") VALUES ('7f0fb938-396f-4efd-80be-1fe7c02a085c', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:21:00.249947+00', '1', '1.0', '{}', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b');`) .raw(`INSERT INTO "${CDM_CORE_SCHEMA}"."Role" ("Id", "Title", "Editable", "TenantId", "CreatedAt", "InstanceId") VALUES ('2115d87d-b288-419f-bbe4-6b0c677937ce', 'Role1', true, '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:21:00.249947+00', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('ffa000f3-92d0-479f-9cdf-eb59f5897d4b', 'Role2', true, '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:21:00.249947+00', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('8027d54d-d43e-4b8f-9eef-827b748db094', 'Role3', true, '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:21:00.249947+00', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b');`) .raw(`INSERT INTO "${CDM_CORE_SCHEMA}"."Role-BusinessApps" ("RoleId", "BusinessAppId") VALUES ('2115d87d-b288-419f-bbe4-6b0c677937ce', '7f0fb938-396f-4efd-80be-1fe7c02a085c');`) .raw(`INSERT INTO "${CDM_CORE_SCHEMA}"."Site" ("Id", "Title", "TenantId", "CreatedAt", "InstanceId") VALUES ('0f838744-3589-426c-9b4b-f6d9ec8e6f8f', 'Demo-site-0f83', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:21:00.249947+00', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('41b986b7-2001-4ff9-a098-15c8d1fb5158', 'Demo-site-41b9', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:21:00.249947+00', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('7321dd27-6b9b-4aae-a16a-89008f134565', 'Demo-site-7321', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:21:00.249947+00', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b');`) .raw(`INSERT INTO "${CDM_CORE_SCHEMA}"."Site-Roles" ("RoleId", "SiteId") VALUES ('2115d87d-b288-419f-bbe4-6b0c677937ce', '0f838744-3589-426c-9b4b-f6d9ec8e6f8f'), ('2115d87d-b288-419f-bbe4-6b0c677937ce', '41b986b7-2001-4ff9-a098-15c8d1fb5158'), ('2115d87d-b288-419f-bbe4-6b0c677937ce', '7321dd27-6b9b-4aae-a16a-89008f134565'), ('8027d54d-d43e-4b8f-9eef-827b748db094', '7321dd27-6b9b-4aae-a16a-89008f134565'), ('ffa000f3-92d0-479f-9cdf-eb59f5897d4b', '7321dd27-6b9b-4aae-a16a-89008f134565');`) .raw(`INSERT INTO "${CDM_CORE_SCHEMA}"."Visualization" ("Id", "TenantId", "CreatedAt", "DescriptorSchemaId", "DescriptorSchemaVersion", "Descriptor", "BusinessAppId", "Type", "BaseURL", "Path", "InstanceId") VALUES ('1e504721-8532-4a80-8fdd-0d88744c336f', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:12:35.808107+00', NULL, '1.0', '{ "sap.ui": { "icons": { "icon": "sap-icon://line-chart" }, "technology": "UI5" }, "sap.app": { "id": "card.explorer.line.card", "info": "Additional information about this Card", "tags": { "keywords": [ "Analytical", "Card", "Line", "Sample" ] }, "type": "card", "title": "Sample of a Line Chart", "subTitle": "Sample of a Line Chart", "shortTitle": "A short title for this Card", "description": "A long description for this Card", "applicationVersion": { "version": "1.0.2" } }, "_version": "1.14.0", "sap.card": { "type": "Analytical", "header": { "data": { "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/header", "withCredentials": false } }, "type": "Numeric", "title": "Digital Practice ( {deviation/number} projects )", "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$1resourceType=STORY&mode=view" } } ], "details": "{details}", "subTitle": "Project revenue", "mainIndicator": { "unit": "{unit}", "state": "{state}", "trend": "{trend}", "number": "{number}" }, "sideIndicators": [], "unitOfMeasurement": "" }, "content": { "data": { "path": "/list", "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/content", "withCredentials": false } }, "feeds": [ { "uid": "valueAxis", "type": "Measure", "values": [ "{measures/revenueLabel}", "{measures/costLabel}" ] }, { "uid": "categoryAxis", "type": "Dimension", "values": [ "{dimensions/weekLabel}" ] } ], "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$2resourceType=STORY&mode=view" } } ], "measures": [ { "name": "{measures/revenueLabel}", "value": "{Revenue}" }, { "name": "{measures/costLabel}", "value": "{Cost}" } ], "chartType": "Line", "dimensions": [ { "name": "{dimensions/weekLabel}", "value": "{Week}" } ], "chartProperties": { "title": { "text": "Utilization by month", "visible": true, "alignment": "left" }, "legend": { "visible": "{legend/visible}" }, "plotArea": { "dataLabel": { "visible": true } }, "valueAxis": { "title": { "visible": false } }, "legendGroup": { "layout": { "position": "{legend/position}", "alignment": "{legend/alignment}" } }, "categoryAxis": { "title": { "visible": false } } } } } }', '7f0fb938-396f-4efd-80be-1fe7c02a085c', 'sap.card', '', '', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('5a119bf3-8540-42b6-a0b4-059db20cd459', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:12:35.808107+00', NULL, '1.0', '{ "sap.ui": { "icons": { "icon": "sap-icon://line-chart" }, "technology": "UI5" }, "sap.app": { "id": "card.explorer.line.card", "info": "Additional information about this Card", "tags": { "keywords": [ "Analytical", "Card", "Line", "Sample" ] }, "type": "card", "title": "Sample of a Line Chart", "subTitle": "Sample of a Line Chart", "shortTitle": "A short title for this Card", "description": "A long description for this Card", "applicationVersion": { "version": "1.0.2" } }, "_version": "1.14.0", "sap.card": { "type": "Analytical", "header": { "data": { "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/header", "withCredentials": false } }, "type": "Numeric", "title": "Digital Practice ( {deviation/number} projects )", "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$1resourceType=STORY&mode=view" } } ], "details": "{details}", "subTitle": "Project revenue", "mainIndicator": { "unit": "{unit}", "state": "{state}", "trend": "{trend}", "number": "{number}" }, "sideIndicators": [], "unitOfMeasurement": "" }, "content": { "data": { "path": "/list", "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/content", "withCredentials": false } }, "feeds": [ { "uid": "valueAxis", "type": "Measure", "values": [ "{measures/revenueLabel}", "{measures/costLabel}" ] }, { "uid": "categoryAxis", "type": "Dimension", "values": [ "{dimensions/weekLabel}" ] } ], "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$2resourceType=STORY&mode=view" } } ], "measures": [ { "name": "{measures/revenueLabel}", "value": "{Revenue}" }, { "name": "{measures/costLabel}", "value": "{Cost}" } ], "chartType": "Line", "dimensions": [ { "name": "{dimensions/weekLabel}", "value": "{Week}" } ], "chartProperties": { "title": { "text": "Utilization by month", "visible": true, "alignment": "left" }, "legend": { "visible": "{legend/visible}" }, "plotArea": { "dataLabel": { "visible": true } }, "valueAxis": { "title": { "visible": false } }, "legendGroup": { "layout": { "position": "{legend/position}", "alignment": "{legend/alignment}" } }, "categoryAxis": { "title": { "visible": false } } } } } }', '7f0fb938-396f-4efd-80be-1fe7c02a085c', 'sap.card', '', '', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('7adb5695-f954-4e5c-b8b7-ac947cff3ac9', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:12:35.808107+00', NULL, '1.0', '{ "sap.ui": { "icons": { "icon": "sap-icon://line-chart" }, "technology": "UI5" }, "sap.app": { "id": "card.explorer.line.card", "info": "Additional information about this Card", "tags": { "keywords": [ "Analytical", "Card", "Line", "Sample" ] }, "type": "card", "title": "Sample of a Line Chart", "subTitle": "Sample of a Line Chart", "shortTitle": "A short title for this Card", "description": "A long description for this Card", "applicationVersion": { "version": "1.0.2" } }, "_version": "1.14.0", "sap.card": { "type": "Analytical", "header": { "data": { "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/header", "withCredentials": false } }, "type": "Numeric", "title": "Digital Practice ( {deviation/number} projects )", "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$1resourceType=STORY&mode=view" } } ], "details": "{details}", "subTitle": "Project revenue", "mainIndicator": { "unit": "{unit}", "state": "{state}", "trend": "{trend}", "number": "{number}" }, "sideIndicators": [], "unitOfMeasurement": "" }, "content": { "data": { "path": "/list", "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/content", "withCredentials": false } }, "feeds": [ { "uid": "valueAxis", "type": "Measure", "values": [ "{measures/revenueLabel}", "{measures/costLabel}" ] }, { "uid": "categoryAxis", "type": "Dimension", "values": [ "{dimensions/weekLabel}" ] } ], "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$2resourceType=STORY&mode=view" } } ], "measures": [ { "name": "{measures/revenueLabel}", "value": "{Revenue}" }, { "name": "{measures/costLabel}", "value": "{Cost}" } ], "chartType": "Line", "dimensions": [ { "name": "{dimensions/weekLabel}", "value": "{Week}" } ], "chartProperties": { "title": { "text": "Utilization by month", "visible": true, "alignment": "left" }, "legend": { "visible": "{legend/visible}" }, "plotArea": { "dataLabel": { "visible": true } }, "valueAxis": { "title": { "visible": false } }, "legendGroup": { "layout": { "position": "{legend/position}", "alignment": "{legend/alignment}" } }, "categoryAxis": { "title": { "visible": false } } } } } }', '7f0fb938-396f-4efd-80be-1fe7c02a085c', 'sap.card', '/content-repository/v2/cards', '/com.sap.bpm.tc.widget/e4811ce6de36040fa479960ebb6a8182', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('97176e7f-b2ea-4e31-842a-3efa5086b320', '9f77a69d-5d71-48b4-b759-93616a3d60f6', '2022-03-21 14:12:35.808107+00', NULL, '1.0', '{ "sap.ui": { "icons": { "icon": "sap-icon://line-chart" }, "technology": "UI5" }, "sap.app": { "id": "card.explorer.line.card", "info": "Additional information about this Card", "tags": { "keywords": [ "Analytical", "Card", "Line", "Sample" ] }, "type": "card", "title": "Sample of a Line Chart", "subTitle": "Sample of a Line Chart", "shortTitle": "A short title for this Card", "description": "A long description for this Card", "applicationVersion": { "version": "1.0.2" } }, "_version": "1.14.0", "sap.card": { "type": "Analytical", "header": { "data": { "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/header", "withCredentials": false } }, "type": "Numeric", "title": "Digital Practice ( {deviation/number} projects )", "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$1resourceType=STORY&mode=view" } } ], "details": "{details}", "subTitle": "Project revenue", "mainIndicator": { "unit": "{unit}", "state": "{state}", "trend": "{trend}", "number": "{number}" }, "sideIndicators": [], "unitOfMeasurement": "" }, "content": { "data": { "path": "/list", "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/content", "withCredentials": false } }, "feeds": [ { "uid": "valueAxis", "type": "Measure", "values": [ "{measures/revenueLabel}", "{measures/costLabel}" ] }, { "uid": "categoryAxis", "type": "Dimension", "values": [ "{dimensions/weekLabel}" ] } ], "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$2resourceType=STORY&mode=view" } } ], "measures": [ { "name": "{measures/revenueLabel}", "value": "{Revenue}" }, { "name": "{measures/costLabel}", "value": "{Cost}" } ], "chartType": "Line", "dimensions": [ { "name": "{dimensions/weekLabel}", "value": "{Week}" } ], "chartProperties": { "title": { "text": "Utilization by month", "visible": true, "alignment": "left" }, "legend": { "visible": "{legend/visible}" }, "plotArea": { "dataLabel": { "visible": true } }, "valueAxis": { "title": { "visible": false } }, "legendGroup": { "layout": { "position": "{legend/position}", "alignment": "{legend/alignment}" } }, "categoryAxis": { "title": { "visible": false } } } } } }', '7f0fb938-396f-4efd-80be-1fe7c02a085c', 'sap.card', '/content-repository/v2/cards', '/sap.ushell.samplecards.imageCard/a297324049c0b349ef9309f11acc8da0', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('287e3392-00d9-4548-ba64-7055318f5565', '77288b2c-22ab-4c6d-a29c-cd30c74fc212', '2022-03-21 14:12:35.808107+00', NULL, '1.0', '{ "sap.ui": { "icons": { "icon": "sap-icon://line-chart" }, "technology": "UI5" }, "sap.app": { "id": "card.explorer.line.card", "info": "Additional information about this Card", "tags": { "keywords": [ "Analytical", "Card", "Line", "Sample" ] }, "type": "card", "title": "Sample of a Line Chart", "subTitle": "Sample of a Line Chart", "shortTitle": "A short title for this Card", "description": "A long description for this Card", "applicationVersion": { "version": "1.0.2" } }, "_version": "1.14.0", "sap.card": { "type": "Analytical", "header": { "data": { "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/header", "withCredentials": false } }, "type": "Numeric", "title": "Digital Practice ( {deviation/number} projects )", "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$1resourceType=STORY&mode=view" } } ], "details": "{details}", "subTitle": "Project revenue", "mainIndicator": { "unit": "{unit}", "state": "{state}", "trend": "{trend}", "number": "{number}" }, "sideIndicators": [], "unitOfMeasurement": "" }, "content": { "data": { "path": "/list", "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/content", "withCredentials": false } }, "feeds": [ { "uid": "valueAxis", "type": "Measure", "values": [ "{measures/revenueLabel}", "{measures/costLabel}" ] }, { "uid": "categoryAxis", "type": "Dimension", "values": [ "{dimensions/weekLabel}" ] } ], "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$2resourceType=STORY&mode=view" } } ], "measures": [ { "name": "{measures/revenueLabel}", "value": "{Revenue}" }, { "name": "{measures/costLabel}", "value": "{Cost}" } ], "chartType": "Line", "dimensions": [ { "name": "{dimensions/weekLabel}", "value": "{Week}" } ], "chartProperties": { "title": { "text": "Utilization by month", "visible": true, "alignment": "left" }, "legend": { "visible": "{legend/visible}" }, "plotArea": { "dataLabel": { "visible": true } }, "valueAxis": { "title": { "visible": false } }, "legendGroup": { "layout": { "position": "{legend/position}", "alignment": "{legend/alignment}" } }, "categoryAxis": { "title": { "visible": false } } } } } }', '7f0fb938-396f-4efd-80be-1fe7c02a085c', 'sap.card', '/content-repository/v2/cards', '/successfactors.card.cardservicereuse.infocard/632c1620a565131f841015b059f6c381', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b'), ('25aa15f2-d26f-4070-84fa-6d47257fa95e', '77288b2c-22ab-4c6d-a29c-cd30c74fc212', '2022-03-21 14:12:35.808107+00', NULL, '1.0', '{ "sap.ui": { "icons": { "icon": "sap-icon://line-chart" }, "technology": "UI5" }, "sap.app": { "id": "card.explorer.line.card", "info": "Additional information about this Card", "tags": { "keywords": [ "Analytical", "Card", "Line", "Sample" ] }, "type": "card", "title": "Sample of a Line Chart", "subTitle": "Sample of a Line Chart", "shortTitle": "A short title for this Card", "description": "A long description for this Card", "applicationVersion": { "version": "1.0.2" } }, "_version": "1.14.0", "sap.card": { "type": "Analytical", "header": { "data": { "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/header", "withCredentials": false } }, "type": "Numeric", "title": "Digital Practice ( {deviation/number} projects )", "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$1resourceType=STORY&mode=view" } } ], "details": "{details}", "subTitle": "Project revenue", "mainIndicator": { "unit": "{unit}", "state": "{state}", "trend": "{trend}", "number": "{number}" }, "sideIndicators": [], "unitOfMeasurement": "" }, "content": { "data": { "path": "/list", "request": { "url": "https://dpsdemoapp.cfapps.eu10.hana.ondemand.com/content", "withCredentials": false } }, "feeds": [ { "uid": "valueAxis", "type": "Measure", "values": [ "{measures/revenueLabel}", "{measures/costLabel}" ] }, { "uid": "categoryAxis", "type": "Dimension", "values": [ "{dimensions/weekLabel}" ] } ], "actions": [ { "type": "Navigation", "parameters": { "url": "https://dp-sac-cont-dev.eu10.hcs.cloud.sap/sap/fpa/ui/app.html#/story&/s/AA358B02F00B95B8D7A08609C7D56789/$2resourceType=STORY&mode=view" } } ], "measures": [ { "name": "{measures/revenueLabel}", "value": "{Revenue}" }, { "name": "{measures/costLabel}", "value": "{Cost}" } ], "chartType": "Line", "dimensions": [ { "name": "{dimensions/weekLabel}", "value": "{Week}" } ], "chartProperties": { "title": { "text": "Utilization by month", "visible": true, "alignment": "left" }, "legend": { "visible": "{legend/visible}" }, "plotArea": { "dataLabel": { "visible": true } }, "valueAxis": { "title": { "visible": false } }, "legendGroup": { "layout": { "position": "{legend/position}", "alignment": "{legend/alignment}" } }, "categoryAxis": { "title": { "visible": false } } } } } }', '7f0fb938-396f-4efd-80be-1fe7c02a085c', 'sap.card', '/content-repository/v2/cards', '/successfactors.card.cardservicereuse.actioncard/c8390120d890edb6db19bb8837d7f60c', '1d59c4d7-5985-4f21-ad3c-1ac66bf14d2b');`); }; export function down(knex: Knex): Promise { return knex.schema.raw(`DROP SCHEMA IF EXISTS "${CDM_CORE_SCHEMA}" CASCADE;`); }