mirror of
https://github.com/bitwarden/server.git
synced 2024-12-01 13:43:23 +01:00
02bea3c48d
* [SG-549] Commit Initial AuthRequest Repository (#2174) * Model Passwordless * Scaffold database for Passwordless * Implement SQL Repository * [SG-167] Base Passwordless API (#2185) * Implement Passwordless notifications * Implement Controller * Add documentation to BaseRequestValidator * Register AuthRequestRepo * Remove ExpirationDate from the AuthRequest table * [SG-407] Create job to delete expired requests (#2187) * chore: init * remove exp date * fix: log name * [SG-167] Added fingerprint phrase to response model. (#2233) * Remove FailedLoginAttempt logic * Block unknown devices * Add EF Support for passwordless * Got SignalR working for responses * Added delete job method to EF repo * Implement a GetMany API endpoint for AuthRequests * Ran dotnet format * Fix a merge issues * Redated migration scripts * tried sorting sqlproj * Remove FailedLoginAttempts from SQL * Groom Postgres script * Remove extra commas from migration script * Correct isSpent() * [SG-167] Adde identity validation for passwordless requests. Registered IAuthRepository. * [SG-167] Added origin of the request to response model * Use display name for device identifier in response * Add datetime conversions back to postgres migration script * [SG-655] Add anonymous endpoint for checking if a device & user combo match * [review] Consolidate error conditions Co-authored-by: Brandon Maharaj <107377945+BrandonM-Bitwarden@users.noreply.github.com> Co-authored-by: André Filipe da Silva Bispo <andrefsbispo@hotmail.com> Co-authored-by: André Bispo <abispo@bitwarden.com>
906 lines
32 KiB
C#
906 lines
32 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Bit.PostgresMigrations.Migrations;
|
|
|
|
public partial class PasswordlessAuthRequests : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "User",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RenewalReminderDate",
|
|
table: "User",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "PremiumExpirationDate",
|
|
table: "User",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "LastFailedLoginDate",
|
|
table: "User",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "User",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "AccountRevisionDate",
|
|
table: "User",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Transaction",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "SsoUser",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "SsoConfig",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "SsoConfig",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Send",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ExpirationDate",
|
|
table: "Send",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "DeletionDate",
|
|
table: "Send",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Send",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "ProviderUser",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "ProviderUser",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "ProviderOrganization",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "ProviderOrganization",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Provider",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Provider",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Policy",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Policy",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "OrganizationUser",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "OrganizationUser",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ValidUntil",
|
|
table: "OrganizationSponsorship",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "LastSyncDate",
|
|
table: "OrganizationSponsorship",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "OrganizationApiKey",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Organization",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "OwnersNotifiedOfAutoscaling",
|
|
table: "Organization",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ExpirationDate",
|
|
table: "Organization",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Organization",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Installation",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Group",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Group",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ExpirationDate",
|
|
table: "Grant",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Grant",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ConsumedDate",
|
|
table: "Grant",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Folder",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Folder",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "Date",
|
|
table: "Event",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RecoveryInitiatedDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "LastNotificationDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Device",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Device",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Collection",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Collection",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Cipher",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "DeletedDate",
|
|
table: "Cipher",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Cipher",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp without time zone");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "AuthRequest",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
UserId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Type = table.Column<byte>(type: "smallint", nullable: false),
|
|
RequestDeviceIdentifier = table.Column<string>(type: "text", nullable: true),
|
|
RequestDeviceType = table.Column<byte>(type: "smallint", nullable: false),
|
|
RequestIpAddress = table.Column<string>(type: "text", nullable: true),
|
|
RequestFingerprint = table.Column<string>(type: "text", nullable: true),
|
|
ResponseDeviceId = table.Column<Guid>(type: "uuid", nullable: true),
|
|
AccessCode = table.Column<string>(type: "text", nullable: true),
|
|
PublicKey = table.Column<string>(type: "text", nullable: true),
|
|
Key = table.Column<string>(type: "text", nullable: true),
|
|
MasterPasswordHash = table.Column<string>(type: "text", nullable: true),
|
|
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
ResponseDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
|
AuthenticationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_AuthRequest", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_AuthRequest_Device_ResponseDeviceId",
|
|
column: x => x.ResponseDeviceId,
|
|
principalTable: "Device",
|
|
principalColumn: "Id");
|
|
table.ForeignKey(
|
|
name: "FK_AuthRequest_User_UserId",
|
|
column: x => x.UserId,
|
|
principalTable: "User",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_AuthRequest_ResponseDeviceId",
|
|
table: "AuthRequest",
|
|
column: "ResponseDeviceId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_AuthRequest_UserId",
|
|
table: "AuthRequest",
|
|
column: "UserId");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "AuthRequest");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "User",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RenewalReminderDate",
|
|
table: "User",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "PremiumExpirationDate",
|
|
table: "User",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "LastFailedLoginDate",
|
|
table: "User",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "User",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "AccountRevisionDate",
|
|
table: "User",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Transaction",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "SsoUser",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "SsoConfig",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "SsoConfig",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Send",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ExpirationDate",
|
|
table: "Send",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "DeletionDate",
|
|
table: "Send",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Send",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "ProviderUser",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "ProviderUser",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "ProviderOrganization",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "ProviderOrganization",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Provider",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Provider",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Policy",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Policy",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "OrganizationUser",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "OrganizationUser",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ValidUntil",
|
|
table: "OrganizationSponsorship",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "LastSyncDate",
|
|
table: "OrganizationSponsorship",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "OrganizationApiKey",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Organization",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "OwnersNotifiedOfAutoscaling",
|
|
table: "Organization",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ExpirationDate",
|
|
table: "Organization",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Organization",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Installation",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Group",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Group",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ExpirationDate",
|
|
table: "Grant",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Grant",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ConsumedDate",
|
|
table: "Grant",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Folder",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Folder",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "Date",
|
|
table: "Event",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RecoveryInitiatedDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "LastNotificationDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "EmergencyAccess",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Device",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Device",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Collection",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Collection",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "RevisionDate",
|
|
table: "Cipher",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "DeletedDate",
|
|
table: "Cipher",
|
|
type: "timestamp without time zone",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "CreationDate",
|
|
table: "Cipher",
|
|
type: "timestamp without time zone",
|
|
nullable: false,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone");
|
|
}
|
|
}
|