using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace VigilCareClinicalAPI.Migrations { /// public partial class AddClinicalUsers : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "clinical_users", columns: table => new { id = table.Column(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"), username = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), password_hash = table.Column(type: "character varying(500)", maxLength: 500, nullable: false), display_name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), role = table.Column(type: "character varying(20)", maxLength: 20, nullable: false), is_active = table.Column(type: "boolean", nullable: false, defaultValue: true), created_at = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "NOW()"), last_login_at = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_clinical_users", x => x.id); }); migrationBuilder.CreateIndex( name: "IX_clinical_users_username", table: "clinical_users", column: "username", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "clinical_users"); } } }