Database Update

This commit is contained in:
Andre Beging
2022-04-04 16:39:40 +02:00
parent c70fb6426c
commit e8f9c4c0f5
11 changed files with 275 additions and 47 deletions

View File

@@ -720,7 +720,7 @@
<Height>18 px</Height> <Height>18 px</Height>
</Size> </Size>
<Oid xsi:type="SchemaModelOID"> <Oid xsi:type="SchemaModelOID">
<Path>7856bc01-520d-4caf-aefc-7bd4f1c78bd7</Path> <Path>77b8afb4-e570-40e7-a023-74137c7d5407</Path>
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName> <TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
</Oid> </Oid>
</Model> </Model>
@@ -738,6 +738,25 @@
<Width>290 px</Width> <Width>290 px</Width>
<Height>18 px</Height> <Height>18 px</Height>
</Size> </Size>
<Oid xsi:type="SchemaModelOID">
<Path>7856bc01-520d-4caf-aefc-7bd4f1c78bd7</Path>
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
</Oid>
</Model>
<Model xsi:type="PropertyVwModel">
<CustomProperties>
<OID>40</OID>
<Parent>31</Parent>
</CustomProperties>
<Children />
<Location>
<X>0.5 px</X>
<Y>144.5 px</Y>
</Location>
<Size>
<Width>290 px</Width>
<Height>18 px</Height>
</Size>
<Oid xsi:type="SchemaModelOID"> <Oid xsi:type="SchemaModelOID">
<Path>735a509b-89a5-44b6-a80d-dc1bcd369ee2</Path> <Path>735a509b-89a5-44b6-a80d-dc1bcd369ee2</Path>
<TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName> <TypeName>EntityDeveloper.EntityFrameworkCore.EntityProperty</TypeName>
@@ -746,23 +765,23 @@
</Children> </Children>
<Size> <Size>
<Width>291 px</Width> <Width>291 px</Width>
<Height>145 px</Height> <Height>163 px</Height>
</Size> </Size>
<MaxSize> <MaxSize>
<Width>0 px</Width> <Width>0 px</Width>
<Height>145 px</Height> <Height>163 px</Height>
</MaxSize> </MaxSize>
</Model> </Model>
<Model xsi:type="RelationPropertiesVwModel"> <Model xsi:type="RelationPropertiesVwModel">
<CustomProperties> <CustomProperties>
<OID>40</OID> <OID>41</OID>
<Parent>30</Parent> <Parent>30</Parent>
</CustomProperties> </CustomProperties>
<Children> <Children>
<Model xsi:type="RelationPropertyVwModel"> <Model xsi:type="RelationPropertyVwModel">
<CustomProperties> <CustomProperties>
<OID>41</OID> <OID>42</OID>
<Parent>40</Parent> <Parent>41</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Size> <Size>
@@ -776,8 +795,8 @@
</Model> </Model>
<Model xsi:type="RelationPropertyVwModel"> <Model xsi:type="RelationPropertyVwModel">
<CustomProperties> <CustomProperties>
<OID>42</OID> <OID>43</OID>
<Parent>40</Parent> <Parent>41</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -796,7 +815,7 @@
</Children> </Children>
<Location> <Location>
<X>0 px</X> <X>0 px</X>
<Y>144 px</Y> <Y>162 px</Y>
</Location> </Location>
<Size> <Size>
<Width>291 px</Width> <Width>291 px</Width>
@@ -815,15 +834,15 @@
</Location> </Location>
<Size> <Size>
<Width>296 px</Width> <Width>296 px</Width>
<Height>248 px</Height> <Height>266 px</Height>
</Size> </Size>
<MinSize> <MinSize>
<Width>100 px</Width> <Width>100 px</Width>
<Height>248 px</Height> <Height>266 px</Height>
</MinSize> </MinSize>
<MaxSize> <MaxSize>
<Width>800 px</Width> <Width>800 px</Width>
<Height>248 px</Height> <Height>266 px</Height>
</MaxSize> </MaxSize>
<Ports /> <Ports />
<Oid xsi:type="SchemaModelOID"> <Oid xsi:type="SchemaModelOID">
@@ -834,11 +853,11 @@
</Model> </Model>
<Model xsi:type="AssociationVwModel"> <Model xsi:type="AssociationVwModel">
<CustomProperties> <CustomProperties>
<OID>43</OID> <OID>44</OID>
<OutModel>1</OutModel> <OutModel>1</OutModel>
<InModel>30</InModel> <InModel>30</InModel>
<OutPort>44</OutPort> <OutPort>45</OutPort>
<InPort>45</InPort> <InPort>46</InPort>
<Parent>0</Parent> <Parent>0</Parent>
</CustomProperties> </CustomProperties>
<PortAnchors> <PortAnchors>
@@ -850,7 +869,7 @@
<Anchors>Left Right</Anchors> <Anchors>Left Right</Anchors>
<Align>Bottom</Align> <Align>Bottom</Align>
<CustomProperties> <CustomProperties>
<OID>44</OID> <OID>45</OID>
<PortType>FloatAnchor</PortType> <PortType>FloatAnchor</PortType>
</CustomProperties> </CustomProperties>
</Port> </Port>
@@ -862,7 +881,7 @@
<Anchors>Left Right</Anchors> <Anchors>Left Right</Anchors>
<Align>Top</Align> <Align>Top</Align>
<CustomProperties> <CustomProperties>
<OID>45</OID> <OID>46</OID>
<PortType>FloatAnchor</PortType> <PortType>FloatAnchor</PortType>
</CustomProperties> </CustomProperties>
</Port> </Port>
@@ -875,20 +894,20 @@
</Model> </Model>
<Model xsi:type="EnumTypeVwModel"> <Model xsi:type="EnumTypeVwModel">
<CustomProperties> <CustomProperties>
<OID>46</OID> <OID>47</OID>
<Parent>0</Parent> <Parent>0</Parent>
</CustomProperties> </CustomProperties>
<Children> <Children>
<Model xsi:type="PropertiesVwModel"> <Model xsi:type="PropertiesVwModel">
<CustomProperties> <CustomProperties>
<OID>47</OID> <OID>48</OID>
<Parent>46</Parent> <Parent>47</Parent>
</CustomProperties> </CustomProperties>
<Children> <Children>
<Model xsi:type="EnumTypeMemberVwModel"> <Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties> <CustomProperties>
<OID>48</OID> <OID>49</OID>
<Parent>47</Parent> <Parent>48</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -906,8 +925,8 @@
</Model> </Model>
<Model xsi:type="EnumTypeMemberVwModel"> <Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties> <CustomProperties>
<OID>49</OID> <OID>50</OID>
<Parent>47</Parent> <Parent>48</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -925,8 +944,8 @@
</Model> </Model>
<Model xsi:type="EnumTypeMemberVwModel"> <Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties> <CustomProperties>
<OID>50</OID> <OID>51</OID>
<Parent>47</Parent> <Parent>48</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -944,8 +963,8 @@
</Model> </Model>
<Model xsi:type="EnumTypeMemberVwModel"> <Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties> <CustomProperties>
<OID>51</OID> <OID>52</OID>
<Parent>47</Parent> <Parent>48</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -963,8 +982,8 @@
</Model> </Model>
<Model xsi:type="EnumTypeMemberVwModel"> <Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties> <CustomProperties>
<OID>52</OID> <OID>53</OID>
<Parent>47</Parent> <Parent>48</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -982,8 +1001,8 @@
</Model> </Model>
<Model xsi:type="EnumTypeMemberVwModel"> <Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties> <CustomProperties>
<OID>53</OID> <OID>54</OID>
<Parent>47</Parent> <Parent>48</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -1001,8 +1020,8 @@
</Model> </Model>
<Model xsi:type="EnumTypeMemberVwModel"> <Model xsi:type="EnumTypeMemberVwModel">
<CustomProperties> <CustomProperties>
<OID>54</OID> <OID>55</OID>
<Parent>47</Parent> <Parent>48</Parent>
</CustomProperties> </CustomProperties>
<Children /> <Children />
<Location> <Location>
@@ -1054,11 +1073,11 @@
</Model> </Model>
<Model xsi:type="AssociationVwModel"> <Model xsi:type="AssociationVwModel">
<CustomProperties> <CustomProperties>
<OID>55</OID> <OID>56</OID>
<OutModel>20</OutModel> <OutModel>20</OutModel>
<InModel>30</InModel> <InModel>30</InModel>
<OutPort>56</OutPort> <OutPort>57</OutPort>
<InPort>57</InPort> <InPort>58</InPort>
<Parent>0</Parent> <Parent>0</Parent>
</CustomProperties> </CustomProperties>
<PortAnchors> <PortAnchors>
@@ -1070,19 +1089,19 @@
<Anchors>Top Bottom</Anchors> <Anchors>Top Bottom</Anchors>
<Align>Right</Align> <Align>Right</Align>
<CustomProperties> <CustomProperties>
<OID>56</OID> <OID>57</OID>
<PortType>FloatAnchor</PortType> <PortType>FloatAnchor</PortType>
</CustomProperties> </CustomProperties>
</Port> </Port>
<Port> <Port>
<Location> <Location>
<X>0 px</X> <X>0 px</X>
<Y>100.989690721649 px</Y> <Y>108.319587628866 px</Y>
</Location> </Location>
<Anchors>Top Bottom</Anchors> <Anchors>Top Bottom</Anchors>
<Align>Left</Align> <Align>Left</Align>
<CustomProperties> <CustomProperties>
<OID>57</OID> <OID>58</OID>
<PortType>FloatAnchor</PortType> <PortType>FloatAnchor</PortType>
</CustomProperties> </CustomProperties>
</Port> </Port>
@@ -1094,7 +1113,7 @@
</PointD> </PointD>
<PointD> <PointD>
<X>34 px</X> <X>34 px</X>
<Y>356.989690721649 px</Y> <Y>364.319587628866 px</Y>
</PointD> </PointD>
</BendPoints> </BendPoints>
<IsManuallyRouted>false</IsManuallyRouted> <IsManuallyRouted>false</IsManuallyRouted>

View File

@@ -81,6 +81,9 @@
<property name="ProspectId" type="Guid" p1:ValidateRequired="true" p1:Guid="55b4bace-d6bd-4e19-8a15-8c34157251b6"> <property name="ProspectId" type="Guid" p1:ValidateRequired="true" p1:Guid="55b4bace-d6bd-4e19-8a15-8c34157251b6">
<column name="" not-null="False" /> <column name="" not-null="False" />
</property> </property>
<property name="Alert" type="Boolean" p1:ValidateRequired="true" p1:Guid="77b8afb4-e570-40e7-a023-74137c7d5407">
<column name="" />
</property>
<property name="NotNeeded" type="Boolean" p1:ValidateRequired="true" p1:Guid="7856bc01-520d-4caf-aefc-7bd4f1c78bd7"> <property name="NotNeeded" type="Boolean" p1:ValidateRequired="true" p1:Guid="7856bc01-520d-4caf-aefc-7bd4f1c78bd7">
<column name="" /> <column name="" />
</property> </property>

View File

@@ -2,7 +2,7 @@
// This is auto-generated code. // This is auto-generated code.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template. // This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 04.04.2022 13:38:25 // Code is generated on: 04.04.2022 16:38:40
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -37,6 +37,8 @@ namespace FoodsharingSiegen.Contracts.Entity
public virtual Guid ProspectId { get; set; } public virtual Guid ProspectId { get; set; }
public virtual bool Alert { get; set; }
public virtual bool NotNeeded { get; set; } public virtual bool NotNeeded { get; set; }
public virtual DateTime Created { get; set; } public virtual DateTime Created { get; set; }

View File

@@ -2,7 +2,7 @@
// This is auto-generated code. // This is auto-generated code.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template. // This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 04.04.2022 13:38:25 // Code is generated on: 04.04.2022 16:38:40
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View File

@@ -2,7 +2,7 @@
// This is auto-generated code. // This is auto-generated code.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template. // This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 04.04.2022 13:38:25 // Code is generated on: 04.04.2022 16:38:40
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View File

@@ -2,7 +2,7 @@
// This is auto-generated code. // This is auto-generated code.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template. // This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 04.04.2022 13:38:25 // Code is generated on: 04.04.2022 16:38:40
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View File

@@ -2,7 +2,7 @@
// This is auto-generated code. // This is auto-generated code.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template. // This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 04.04.2022 13:38:25 // Code is generated on: 04.04.2022 16:38:40
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View File

@@ -2,7 +2,7 @@
// This is auto-generated code. // This is auto-generated code.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using EF Core template. // This code was generated by Entity Developer tool using EF Core template.
// Code is generated on: 04.04.2022 13:38:25 // Code is generated on: 04.04.2022 16:38:40
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -137,6 +137,7 @@ namespace FoodsharingSiegen.Server.Data
modelBuilder.Entity<Interaction>().Property(x => x.Info).HasColumnName(@"Info").ValueGeneratedNever(); modelBuilder.Entity<Interaction>().Property(x => x.Info).HasColumnName(@"Info").ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.Type).HasColumnName(@"Type").IsRequired().ValueGeneratedNever(); modelBuilder.Entity<Interaction>().Property(x => x.Type).HasColumnName(@"Type").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.ProspectId).HasColumnName(@"ProspectId").ValueGeneratedNever(); modelBuilder.Entity<Interaction>().Property(x => x.ProspectId).HasColumnName(@"ProspectId").ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.Alert).HasColumnName(@"Alert").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.NotNeeded).HasColumnName(@"NotNeeded").IsRequired().ValueGeneratedNever(); modelBuilder.Entity<Interaction>().Property(x => x.NotNeeded).HasColumnName(@"NotNeeded").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever(); modelBuilder.Entity<Interaction>().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever();
modelBuilder.Entity<Interaction>().HasKey(@"Id"); modelBuilder.Entity<Interaction>().HasKey(@"Id");

View File

@@ -0,0 +1,173 @@
// <auto-generated />
using System;
using FoodsharingSiegen.Server.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
[DbContext(typeof(FsContext))]
[Migration("20220404143914_interalert")]
partial class interalert
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<bool>("Alert")
.HasColumnType("INTEGER")
.HasColumnName("Alert");
b.Property<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<DateTime>("Date")
.HasColumnType("TEXT")
.HasColumnName("Date");
b.Property<string>("Info")
.HasColumnType("TEXT")
.HasColumnName("Info");
b.Property<bool>("NotNeeded")
.HasColumnType("INTEGER")
.HasColumnName("NotNeeded");
b.Property<Guid>("ProspectId")
.HasColumnType("TEXT")
.HasColumnName("ProspectId");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasColumnName("Type");
b.Property<Guid>("UserId")
.HasColumnType("TEXT")
.HasColumnName("UserId");
b.HasKey("Id");
b.HasIndex("ProspectId");
b.HasIndex("UserId");
b.ToTable("Interactions", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<int>("FsId")
.HasColumnType("INTEGER")
.HasColumnName("FsId");
b.Property<string>("Memo")
.HasColumnType("TEXT")
.HasColumnName("Memo");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Name");
b.Property<Guid>("ProgressId")
.HasColumnType("TEXT")
.HasColumnName("ProgressId");
b.HasKey("Id");
b.ToTable("Prospects", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT")
.HasColumnName("Id");
b.Property<DateTime>("Created")
.HasColumnType("TEXT")
.HasColumnName("Created");
b.Property<string>("EncryptedPassword")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("EncryptedPassword");
b.Property<string>("Mail")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Mail");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("Name");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasColumnName("Type");
b.Property<bool>("Verified")
.HasColumnType("INTEGER")
.HasColumnName("Verified");
b.HasKey("Id");
b.ToTable("Users", (string)null);
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
{
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
.WithMany("Interactions")
.HasForeignKey("ProspectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
.WithMany("Interactions")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Prospect");
b.Navigation("User");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
{
b.Navigation("Interactions");
});
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
{
b.Navigation("Interactions");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FoodsharingSiegen.Server.Migrations
{
public partial class interalert : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Alert",
table: "Interactions",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Alert",
table: "Interactions");
}
}
}

View File

@@ -24,6 +24,10 @@ namespace FoodsharingSiegen.Server.Migrations
.HasColumnType("TEXT") .HasColumnType("TEXT")
.HasColumnName("Id"); .HasColumnName("Id");
b.Property<bool>("Alert")
.HasColumnType("INTEGER")
.HasColumnName("Alert");
b.Property<DateTime>("Created") b.Property<DateTime>("Created")
.HasColumnType("TEXT") .HasColumnType("TEXT")
.HasColumnName("Created"); .HasColumnName("Created");