Modify of database
This commit is contained in:
parent
0189ffa50b
commit
d9208917f3
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -158,6 +158,7 @@
|
|||
<Property Name="displayName" Type="varchar(max)" Nullable="true" />
|
||||
<Property Name="avatar" Type="varchar(max)" Nullable="true" />
|
||||
<Property Name="role" Type="int" Nullable="true" />
|
||||
<Property Name="status" Type="smallint" Nullable="false" />
|
||||
</EntityType>
|
||||
<Association Name="FK__Appointme__patie__5AEE82B9">
|
||||
<End Role="Patients" Type="FIT5032Assignment.Store.Patients" Multiplicity="0..1" />
|
||||
|
@ -435,6 +436,7 @@
|
|||
<NavigationProperty Name="Doctors" Relationship="Self.FK__Doctors__user__5441852A" FromRole="Users" ToRole="Doctors" />
|
||||
<NavigationProperty Name="Patients" Relationship="Self.FK__Patients__user__5165187F" FromRole="Users" ToRole="Patients" />
|
||||
<NavigationProperty Name="Sessions" Relationship="Self.FK__Sessions__user__4E88ABD4" FromRole="Users" ToRole="Sessions" />
|
||||
<Property Name="status" Type="Int16" Nullable="false" />
|
||||
</EntityType>
|
||||
<Association Name="FK__Appointme__patie__5AEE82B9">
|
||||
<End Role="Patients" Type="Self.Patients" Multiplicity="0..1" />
|
||||
|
@ -758,6 +760,7 @@
|
|||
<ScalarProperty Name="displayName" ColumnName="displayName" />
|
||||
<ScalarProperty Name="avatar" ColumnName="avatar" />
|
||||
<ScalarProperty Name="role" ColumnName="role" />
|
||||
<ScalarProperty Name="status" ColumnName="status" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
-- --------------------------------------------------
|
||||
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
|
||||
-- --------------------------------------------------
|
||||
-- Date Created: 09/14/2023 16:21:56
|
||||
-- Date Created: 09/15/2023 08:16:24
|
||||
-- Generated from EDMX file: C:\Users\astri\source\repos\FIT5032-Assignment\FIT5032-Assignment\Models\FIT5032-Assignment.edmx
|
||||
-- --------------------------------------------------
|
||||
|
||||
SET QUOTED_IDENTIFIER OFF;
|
||||
GO
|
||||
USE [Database1];
|
||||
USE [FIT5032_Assignment];
|
||||
GO
|
||||
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
|
||||
GO
|
||||
|
@ -23,39 +23,39 @@ GO
|
|||
IF OBJECT_ID(N'[dbo].[FK__Appointme__respo__5BE2A6F2]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Appointments] DROP CONSTRAINT [FK__Appointme__respo__5BE2A6F2];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Images__appointm__60A75C0F]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__appointm__60A75C0F];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Reviews__appoint__6383C8BA]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__appoint__6383C8BA];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Credential__user__4BAC3F29]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Credentials] DROP CONSTRAINT [FK__Credential__user__4BAC3F29];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Doctors__user__5441852A]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Doctors] DROP CONSTRAINT [FK__Doctors__user__5441852A];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Images__appointm__60A75C0F]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__appointm__60A75C0F];
|
||||
IF OBJECT_ID(N'[dbo].[FK__Images__responsi__5FB337D6]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__responsi__5FB337D6];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Reviews__doctor__656C112C]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__doctor__656C112C];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Images__patient__5EBF139D]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__patient__5EBF139D];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Images__responsi__5FB337D6]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Images] DROP CONSTRAINT [FK__Images__responsi__5FB337D6];
|
||||
IF OBJECT_ID(N'[dbo].[FK__ShareURLs__image__68487DD7]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[ShareURLs] DROP CONSTRAINT [FK__ShareURLs__image__68487DD7];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Patients__user__5165187F]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Patients] DROP CONSTRAINT [FK__Patients__user__5165187F];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Reviews__appoint__6383C8BA]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__appoint__6383C8BA];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Reviews__doctor__656C112C]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__doctor__656C112C];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Reviews__patient__6477ECF3]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Reviews] DROP CONSTRAINT [FK__Reviews__patient__6477ECF3];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__Sessions__user__4E88ABD4]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[Sessions] DROP CONSTRAINT [FK__Sessions__user__4E88ABD4];
|
||||
GO
|
||||
IF OBJECT_ID(N'[dbo].[FK__ShareURLs__image__68487DD7]', 'F') IS NOT NULL
|
||||
ALTER TABLE [dbo].[ShareURLs] DROP CONSTRAINT [FK__ShareURLs__image__68487DD7];
|
||||
GO
|
||||
|
||||
-- --------------------------------------------------
|
||||
-- Dropping existing tables
|
||||
|
@ -180,7 +180,8 @@ CREATE TABLE [dbo].[Users] (
|
|||
[uuid] varchar(36) NOT NULL,
|
||||
[displayName] varchar(max) NULL,
|
||||
[avatar] varchar(max) NULL,
|
||||
[role] int NULL
|
||||
[role] int NULL,
|
||||
[status] smallint NOT NULL
|
||||
);
|
||||
GO
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace FIT5032_Assignment.Models
|
|||
public string displayName { get; set; }
|
||||
public string avatar { get; set; }
|
||||
public Nullable<int> role { get; set; }
|
||||
public short status { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<Credentials> Credentials { get; set; }
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</compilers>
|
||||
</system.codedom>
|
||||
<connectionStrings>
|
||||
<add name="Database1Entities" connectionString="metadata=res://*/Models.FIT5032-Assignment.csdl|res://*/Models.FIT5032-Assignment.ssdl|res://*/Models.FIT5032-Assignment.msl;provider=System.Data.SqlClient;provider connection string="data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|\Database1.mdf;integrated security=True;connect timeout=30;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||
<add name="Database1Entities" connectionString="metadata=res://*/Models.FIT5032-Assignment.csdl|res://*/Models.FIT5032-Assignment.ssdl|res://*/Models.FIT5032-Assignment.msl;provider=System.Data.SqlClient;provider connection string="data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|\FIT5032_Assignment.mdf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
|
|
Loading…
Reference in New Issue
Block a user