diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs
index a25c5e6ed8..5b421c731f 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs
@@ -59,7 +59,7 @@ public static class DbQuotaExtension
Tenant = -1,
Name = "trial",
Description = null,
- Features = "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1",
+ Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Price = 0,
ProductId = null,
Visible = false
@@ -69,7 +69,7 @@ public static class DbQuotaExtension
Tenant = -2,
Name = "admin",
Description = null,
- Features = "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1",
+ Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Price = 30,
ProductId = "1002",
Visible = true
diff --git a/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs b/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs
index 20849b4abf..560a57e36f 100644
--- a/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs
+++ b/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs
@@ -73,7 +73,7 @@ namespace ASC.Migrations.MySql.Migrations.CoreDb
new
{
Tenant = -1,
- Features = "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1",
+ Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@@ -81,7 +81,7 @@ namespace ASC.Migrations.MySql.Migrations.CoreDb
new
{
Tenant = -2,
- Features = "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1",
+ Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",
diff --git a/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.cs b/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.cs
index 0ef208a062..20e659fe12 100644
--- a/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.cs
+++ b/migrations/mysql/CoreDbContext/20230130103905_CoreDbContextMigrate.cs
@@ -1,137 +1,161 @@
-using System;
+// (c) Copyright Ascensio System SIA 2010-2022
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
-namespace ASC.Migrations.MySql.Migrations.CoreDb
+namespace ASC.Migrations.MySql.Migrations.CoreDb;
+
+///
+public partial class CoreDbContextMigrate : Migration
{
///
- public partial class CoreDbContextMigrate : Migration
+ protected override void Up(MigrationBuilder migrationBuilder)
{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterDatabase()
- .Annotation("MySql:CharSet", "utf8mb4");
+ migrationBuilder.AlterDatabase()
+ .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "tenants_quota",
- columns: table => new
- {
- tenant = table.Column(type: "int", nullable: false),
- name = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- description = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- features = table.Column(type: "text", nullable: true)
- .Annotation("MySql:CharSet", "utf8"),
- price = table.Column(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"),
- productid = table.Column(name: "product_id", type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- visible = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => x.tenant);
- })
- .Annotation("MySql:CharSet", "utf8");
+ migrationBuilder.CreateTable(
+ name: "tenants_quota",
+ columns: table => new
+ {
+ tenant = table.Column(type: "int", nullable: false),
+ name = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ description = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ features = table.Column(type: "text", nullable: true)
+ .Annotation("MySql:CharSet", "utf8"),
+ price = table.Column(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"),
+ productid = table.Column(name: "product_id", type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ visible = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PRIMARY", x => x.tenant);
+ })
+ .Annotation("MySql:CharSet", "utf8");
- migrationBuilder.CreateTable(
- name: "tenants_quotarow",
- columns: table => new
- {
- tenant = table.Column(type: "int", nullable: false),
- path = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- userid = table.Column(name: "user_id", type: "char(36)", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- counter = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"),
- tag = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- lastmodified = table.Column(name: "last_modified", type: "timestamp", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => new { x.tenant, x.userid, x.path });
- })
- .Annotation("MySql:CharSet", "utf8");
+ migrationBuilder.CreateTable(
+ name: "tenants_quotarow",
+ columns: table => new
+ {
+ tenant = table.Column(type: "int", nullable: false),
+ path = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ userid = table.Column(name: "user_id", type: "char(36)", nullable: false, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ counter = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"),
+ tag = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ lastmodified = table.Column(name: "last_modified", type: "timestamp", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PRIMARY", x => new { x.tenant, x.userid, x.path });
+ })
+ .Annotation("MySql:CharSet", "utf8");
- migrationBuilder.CreateTable(
- name: "tenants_tariff",
- columns: table => new
- {
- id = table.Column(type: "int", nullable: false)
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tenant = table.Column(type: "int", nullable: false),
- stamp = table.Column(type: "datetime", nullable: false),
- customerid = table.Column(name: "customer_id", type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- createon = table.Column(name: "create_on", type: "timestamp", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_tenants_tariff", x => x.id);
- })
- .Annotation("MySql:CharSet", "utf8");
+ migrationBuilder.CreateTable(
+ name: "tenants_tariff",
+ columns: table => new
+ {
+ id = table.Column(type: "int", nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ tenant = table.Column(type: "int", nullable: false),
+ stamp = table.Column(type: "datetime", nullable: false),
+ customerid = table.Column(name: "customer_id", type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
+ .Annotation("MySql:CharSet", "utf8"),
+ createon = table.Column(name: "create_on", type: "timestamp", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_tenants_tariff", x => x.id);
+ })
+ .Annotation("MySql:CharSet", "utf8");
- migrationBuilder.CreateTable(
- name: "tenants_tariffrow",
- columns: table => new
- {
- tariffid = table.Column(name: "tariff_id", type: "int", nullable: false),
- quota = table.Column(type: "int", nullable: false),
- tenant = table.Column(type: "int", nullable: false),
- quantity = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariffid, x.quota });
- })
- .Annotation("MySql:CharSet", "utf8mb4");
+ migrationBuilder.CreateTable(
+ name: "tenants_tariffrow",
+ columns: table => new
+ {
+ tariffid = table.Column(name: "tariff_id", type: "int", nullable: false),
+ quota = table.Column(type: "int", nullable: false),
+ tenant = table.Column(type: "int", nullable: false),
+ quantity = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariffid, x.quota });
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.InsertData(
- table: "tenants_quota",
- columns: new[] { "tenant", "description", "features", "name", "product_id" },
- values: new object[] { -3, null, "free,thirdparty,audit,total_size:2147483648,manager:1,room:12,usersInRoom:3", "startup", null });
+ migrationBuilder.InsertData(
+ table: "tenants_quota",
+ columns: new[] { "tenant", "description", "features", "name", "product_id" },
+ values: new object[] { -3, null, "free,thirdparty,audit,total_size:2147483648,manager:1,room:12,usersInRoom:3", "startup", null });
- migrationBuilder.InsertData(
- table: "tenants_quota",
- columns: new[] { "tenant", "description", "features", "name", "price", "product_id", "visible" },
- values: new object[] { -2, null, "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
+ migrationBuilder.InsertData(
+ table: "tenants_quota",
+ columns: new[] { "tenant", "description", "features", "name", "price", "product_id", "visible" },
+ values: new object[] { -2, null, "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
- migrationBuilder.InsertData(
- table: "tenants_quota",
- columns: new[] { "tenant", "description", "features", "name", "product_id" },
- values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1", "trial", null });
+ migrationBuilder.InsertData(
+ table: "tenants_quota",
+ columns: new[] { "tenant", "description", "features", "name", "product_id" },
+ values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1", "trial", null });
- migrationBuilder.CreateIndex(
- name: "last_modified",
- table: "tenants_quotarow",
- column: "last_modified");
+ migrationBuilder.CreateIndex(
+ name: "last_modified",
+ table: "tenants_quotarow",
+ column: "last_modified");
- migrationBuilder.CreateIndex(
- name: "tenant",
- table: "tenants_tariff",
- column: "tenant");
- }
+ migrationBuilder.CreateIndex(
+ name: "tenant",
+ table: "tenants_tariff",
+ column: "tenant");
+ }
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "tenants_quota");
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "tenants_quota");
- migrationBuilder.DropTable(
- name: "tenants_quotarow");
+ migrationBuilder.DropTable(
+ name: "tenants_quotarow");
- migrationBuilder.DropTable(
- name: "tenants_tariff");
+ migrationBuilder.DropTable(
+ name: "tenants_tariff");
- migrationBuilder.DropTable(
- name: "tenants_tariffrow");
- }
+ migrationBuilder.DropTable(
+ name: "tenants_tariffrow");
}
}
diff --git a/migrations/mysql/CoreDbContext/CoreDbContextModelSnapshot.cs b/migrations/mysql/CoreDbContext/CoreDbContextModelSnapshot.cs
index 9ea92f8c27..248d5c4671 100644
--- a/migrations/mysql/CoreDbContext/CoreDbContextModelSnapshot.cs
+++ b/migrations/mysql/CoreDbContext/CoreDbContextModelSnapshot.cs
@@ -70,7 +70,7 @@ namespace ASC.Migrations.MySql.Migrations.CoreDb
new
{
Tenant = -1,
- Features = "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1",
+ Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@@ -78,7 +78,7 @@ namespace ASC.Migrations.MySql.Migrations.CoreDb
new
{
Tenant = -2,
- Features = "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1",
+ Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",
diff --git a/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs b/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs
index e776235abc..8bf407c850 100644
--- a/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs
+++ b/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.Designer.cs
@@ -68,7 +68,7 @@ namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
new
{
Tenant = -1,
- Features = "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1",
+ Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@@ -76,7 +76,7 @@ namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
new
{
Tenant = -2,
- Features = "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1",
+ Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",
diff --git a/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.cs b/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.cs
index 5871f194d4..aadc226ab6 100644
--- a/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.cs
+++ b/migrations/postgre/CoreDbContext/20230130103905_CoreDbContextMigrate.cs
@@ -1,137 +1,162 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+// (c) Copyright Ascensio System SIA 2010-2022
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+using Microsoft.EntityFrameworkCore.Migrations;
+
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
-namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
+namespace ASC.Migrations.PostgreSql.Migrations.CoreDb;
+
+///
+public partial class CoreDbContextMigrate : Migration
{
///
- public partial class CoreDbContextMigrate : Migration
+ protected override void Up(MigrationBuilder migrationBuilder)
{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.EnsureSchema(
- name: "onlyoffice");
+ migrationBuilder.EnsureSchema(
+ name: "onlyoffice");
- migrationBuilder.CreateTable(
- name: "tenants_quota",
- schema: "onlyoffice",
- columns: table => new
- {
- tenant = table.Column(type: "integer", nullable: false),
- name = table.Column(type: "character varying", nullable: true),
- description = table.Column(type: "character varying", nullable: true),
- features = table.Column(type: "text", nullable: true),
- price = table.Column(type: "numeric(10,2)", nullable: false, defaultValueSql: "0.00"),
- productid = table.Column(name: "product_id", type: "character varying(128)", maxLength: 128, nullable: true, defaultValueSql: "NULL"),
- visible = table.Column(type: "boolean", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("tenants_quota_pkey", x => x.tenant);
- });
+ migrationBuilder.CreateTable(
+ name: "tenants_quota",
+ schema: "onlyoffice",
+ columns: table => new
+ {
+ tenant = table.Column(type: "integer", nullable: false),
+ name = table.Column(type: "character varying", nullable: true),
+ description = table.Column(type: "character varying", nullable: true),
+ features = table.Column(type: "text", nullable: true),
+ price = table.Column(type: "numeric(10,2)", nullable: false, defaultValueSql: "0.00"),
+ productid = table.Column(name: "product_id", type: "character varying(128)", maxLength: 128, nullable: true, defaultValueSql: "NULL"),
+ visible = table.Column(type: "boolean", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("tenants_quota_pkey", x => x.tenant);
+ });
- migrationBuilder.CreateTable(
- name: "tenants_quotarow",
- schema: "onlyoffice",
- columns: table => new
- {
- tenant = table.Column(type: "integer", nullable: false),
- path = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
- counter = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"),
- tag = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "'0'"),
- lastmodified = table.Column(name: "last_modified", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
- userid = table.Column(name: "user_id", type: "uuid", maxLength: 36, nullable: false, defaultValueSql: "NULL")
- },
- constraints: table =>
- {
- table.PrimaryKey("tenants_quotarow_pkey", x => new { x.tenant, x.path });
- });
+ migrationBuilder.CreateTable(
+ name: "tenants_quotarow",
+ schema: "onlyoffice",
+ columns: table => new
+ {
+ tenant = table.Column(type: "integer", nullable: false),
+ path = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ counter = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"),
+ tag = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "'0'"),
+ lastmodified = table.Column(name: "last_modified", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
+ userid = table.Column(name: "user_id", type: "uuid", maxLength: 36, nullable: false, defaultValueSql: "NULL")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("tenants_quotarow_pkey", x => new { x.tenant, x.path });
+ });
- migrationBuilder.CreateTable(
- name: "tenants_tariff",
- schema: "onlyoffice",
- columns: table => new
- {
- id = table.Column(type: "integer", nullable: false)
- .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
- tenant = table.Column(type: "integer", nullable: false),
- stamp = table.Column(type: "timestamp with time zone", nullable: false),
- customerid = table.Column(name: "customer_id", type: "character varying(255)", maxLength: 255, nullable: false, defaultValueSql: "NULL"),
- comment = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"),
- createon = table.Column(name: "create_on", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_tenants_tariff", x => x.id);
- });
+ migrationBuilder.CreateTable(
+ name: "tenants_tariff",
+ schema: "onlyoffice",
+ columns: table => new
+ {
+ id = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ tenant = table.Column(type: "integer", nullable: false),
+ stamp = table.Column(type: "timestamp with time zone", nullable: false),
+ customerid = table.Column(name: "customer_id", type: "character varying(255)", maxLength: 255, nullable: false, defaultValueSql: "NULL"),
+ comment = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"),
+ createon = table.Column(name: "create_on", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_tenants_tariff", x => x.id);
+ });
- migrationBuilder.CreateTable(
- name: "tenants_tariffrow",
- schema: "onlyoffice",
- columns: table => new
- {
- tariffid = table.Column(name: "tariff_id", type: "int", nullable: false),
- quota = table.Column(type: "int", nullable: false),
- tenant = table.Column(type: "int", nullable: false),
- quantity = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariffid, x.quota });
- });
+ migrationBuilder.CreateTable(
+ name: "tenants_tariffrow",
+ schema: "onlyoffice",
+ columns: table => new
+ {
+ tariffid = table.Column(name: "tariff_id", type: "int", nullable: false),
+ quota = table.Column(type: "int", nullable: false),
+ tenant = table.Column(type: "int", nullable: false),
+ quantity = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariffid, x.quota });
+ });
- migrationBuilder.InsertData(
- schema: "onlyoffice",
- table: "tenants_quota",
- columns: new[] { "tenant", "description", "features", "name", "visible" },
- values: new object[] { -3, null, "free,thirdparty,audit,total_size:2147483648,manager:1,room:12,usersInRoom:3", "startup", false });
+ migrationBuilder.InsertData(
+ schema: "onlyoffice",
+ table: "tenants_quota",
+ columns: new[] { "tenant", "description", "features", "name", "visible" },
+ values: new object[] { -3, null, "free,thirdparty,audit,total_size:2147483648,manager:1,room:12,usersInRoom:3", "startup", false });
- migrationBuilder.InsertData(
- schema: "onlyoffice",
- table: "tenants_quota",
- columns: new[] { "tenant", "description", "features", "name", "price", "product_id", "visible" },
- values: new object[] { -2, null, "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
+ migrationBuilder.InsertData(
+ schema: "onlyoffice",
+ table: "tenants_quota",
+ columns: new[] { "tenant", "description", "features", "name", "price", "product_id", "visible" },
+ values: new object[] { -2, null, "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
- migrationBuilder.InsertData(
- schema: "onlyoffice",
- table: "tenants_quota",
- columns: new[] { "tenant", "description", "features", "name", "visible" },
- values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1", "trial", false });
+ migrationBuilder.InsertData(
+ schema: "onlyoffice",
+ table: "tenants_quota",
+ columns: new[] { "tenant", "description", "features", "name", "visible" },
+ values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1", "trial", false });
- migrationBuilder.CreateIndex(
- name: "last_modified_tenants_quotarow",
- schema: "onlyoffice",
- table: "tenants_quotarow",
- column: "last_modified");
+ migrationBuilder.CreateIndex(
+ name: "last_modified_tenants_quotarow",
+ schema: "onlyoffice",
+ table: "tenants_quotarow",
+ column: "last_modified");
- migrationBuilder.CreateIndex(
- name: "tenant_tenants_tariff",
- schema: "onlyoffice",
- table: "tenants_tariff",
- column: "tenant");
- }
+ migrationBuilder.CreateIndex(
+ name: "tenant_tenants_tariff",
+ schema: "onlyoffice",
+ table: "tenants_tariff",
+ column: "tenant");
+ }
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "tenants_quota",
- schema: "onlyoffice");
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "tenants_quota",
+ schema: "onlyoffice");
- migrationBuilder.DropTable(
- name: "tenants_quotarow",
- schema: "onlyoffice");
+ migrationBuilder.DropTable(
+ name: "tenants_quotarow",
+ schema: "onlyoffice");
- migrationBuilder.DropTable(
- name: "tenants_tariff",
- schema: "onlyoffice");
+ migrationBuilder.DropTable(
+ name: "tenants_tariff",
+ schema: "onlyoffice");
- migrationBuilder.DropTable(
- name: "tenants_tariffrow",
- schema: "onlyoffice");
- }
+ migrationBuilder.DropTable(
+ name: "tenants_tariffrow",
+ schema: "onlyoffice");
}
}
diff --git a/migrations/postgre/CoreDbContext/CoreDbContextModelSnapshot.cs b/migrations/postgre/CoreDbContext/CoreDbContextModelSnapshot.cs
index 63aa476a37..de026c5319 100644
--- a/migrations/postgre/CoreDbContext/CoreDbContextModelSnapshot.cs
+++ b/migrations/postgre/CoreDbContext/CoreDbContextModelSnapshot.cs
@@ -65,7 +65,7 @@ namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
new
{
Tenant = -1,
- Features = "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1",
+ Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@@ -73,7 +73,7 @@ namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
new
{
Tenant = -2,
- Features = "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1",
+ Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",