Ignore:
Timestamp:
10/29/25 15:41:48 (11 months ago)
Author:
stefansaveski <stefansaveski19@…>
Branches:
master
Children:
586825e
Parents:
1d32d5c
Message:

Add EMBG property and consolidate migrations

Added EMBG property to User and RegisterDto classes to store unique user identifiers. Removed outdated migration files and introduced a new consolidated migration (20251029131316_InitialCreate) to define the database schema, including User, ContactInfo, EnrollmentInfo, HighSchool, and RefreshToken tables with appropriate relationships. Updated AppDbContextModelSnapshot to reflect the new schema. Changed the development database connection string in appsettings.Development.json for improved configuration.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • iknow-api/Migrations/20251029131316_InitialCreate.Designer.cs

    r1d32d5c rf844b7e  
    1313{
    1414    [DbContext(typeof(AppDbContext))]
    15     [Migration("20251027191028_dbRelations")]
    16     partial class dbRelations
     15    [Migration("20251029131316_InitialCreate")]
     16    partial class InitialCreate
    1717    {
    1818        /// <inheritdoc />
     
    110110                });
    111111
     112            modelBuilder.Entity("iknow_api.Models.RefreshToken", b =>
     113                {
     114                    b.Property<int>("Id")
     115                        .ValueGeneratedOnAdd()
     116                        .HasColumnType("integer");
     117
     118                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
     119
     120                    b.Property<DateTime>("ExpiresAt")
     121                        .HasColumnType("timestamp with time zone");
     122
     123                    b.Property<bool>("IsValid")
     124                        .HasColumnType("boolean");
     125
     126                    b.Property<string>("Token")
     127                        .HasColumnType("text");
     128
     129                    b.Property<int>("UserId")
     130                        .HasColumnType("integer");
     131
     132                    b.HasKey("Id");
     133
     134                    b.HasIndex("UserId");
     135
     136                    b.ToTable("RefreshToken");
     137                });
     138
    112139            modelBuilder.Entity("iknow_api.Models.User", b =>
    113140                {
     
    174201                        .WithOne("HighSchool")
    175202                        .HasForeignKey("iknow_api.Models.HighSchool", "UserId")
     203                        .OnDelete(DeleteBehavior.Cascade)
     204                        .IsRequired();
     205
     206                    b.Navigation("User");
     207                });
     208
     209            modelBuilder.Entity("iknow_api.Models.RefreshToken", b =>
     210                {
     211                    b.HasOne("iknow_api.Models.User", "User")
     212                        .WithMany()
     213                        .HasForeignKey("UserId")
    176214                        .OnDelete(DeleteBehavior.Cascade)
    177215                        .IsRequired();
Note: See TracChangeset for help on using the changeset viewer.