add 03_UserTracker
This commit is contained in:
		
							parent
							
								
									ce114653ed
								
							
						
					
					
						commit
						f7614b4352
					
				| @ -13,6 +13,7 @@ | |||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  |     <EmbeddedResource Include="Scripts\03_UserTracker.sql" /> | ||||||
|     <EmbeddedResource Include="Scripts\02_SeedLookupData.sql" /> |     <EmbeddedResource Include="Scripts\02_SeedLookupData.sql" /> | ||||||
|     <EmbeddedResource Include="Scripts\01_Schema.sql" /> |     <EmbeddedResource Include="Scripts\01_Schema.sql" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|  | |||||||
							
								
								
									
										45
									
								
								EnotaryoPH/EnotaryoPH.DbMigration/Scripts/03_UserTracker.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								EnotaryoPH/EnotaryoPH.DbMigration/Scripts/03_UserTracker.sql
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,45 @@ | |||||||
|  | BEGIN TRANSACTION; | ||||||
|  | 
 | ||||||
|  | ALTER TABLE "LawyerVideoConferenceParticipants" | ||||||
|  | ADD COLUMN IF NOT EXISTS "Device" VARCHAR(255); | ||||||
|  | 
 | ||||||
|  | ALTER TABLE "LawyerVideoConferenceParticipants" | ||||||
|  | ADD COLUMN IF NOT EXISTS "IPAddress" VARCHAR(45); | ||||||
|  | 
 | ||||||
|  | ALTER TABLE "LawyerVideoConferenceParticipants" | ||||||
|  | ADD COLUMN IF NOT EXISTS "Latitude" DECIMAL(10, 6); | ||||||
|  | 
 | ||||||
|  | ALTER TABLE "LawyerVideoConferenceParticipants" | ||||||
|  | ADD COLUMN IF NOT EXISTS "Longitude" DECIMAL(10, 6); | ||||||
|  | 
 | ||||||
|  | ALTER TABLE "LawyerVideoConferenceParticipants" | ||||||
|  | ADD COLUMN IF NOT EXISTS "OTPEntered" VARCHAR(100); | ||||||
|  | 
 | ||||||
|  | ALTER TABLE "LawyerVideoConferenceParticipants" | ||||||
|  | ADD COLUMN IF NOT EXISTS "OTPHash" VARCHAR(255); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | CREATE TABLE IF NOT EXISTS "UserLogins" ( | ||||||
|  | 	"UserLoginID" int8 GENERATED ALWAYS AS IDENTITY( INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1 NO CYCLE) NOT NULL, | ||||||
|  | 	"Failed" bool NULL, | ||||||
|  | 	"IPAddress" varchar NULL, | ||||||
|  | 	"Device" varchar NULL, | ||||||
|  | 	"Longitude" float8 NULL, | ||||||
|  | 	"Latitude" float8 NULL, | ||||||
|  | 	"UsegLogin_UID" uuid DEFAULT uuid_generate_v4() NOT NULL, | ||||||
|  | 	"UserID" int8 NULL, | ||||||
|  | 	"CreatedOn" timestamp DEFAULT now() NULL, | ||||||
|  | 	CONSTRAINT "UserLogins_pk" PRIMARY KEY ("UserLoginID"), | ||||||
|  | 	CONSTRAINT "UserLogins_unique" UNIQUE ("UsegLogin_UID") | ||||||
|  | ); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | -- public."UserLogins" foreign keys | ||||||
|  | 
 | ||||||
|  | ALTER TABLE public."UserLogins" ADD CONSTRAINT "UserLogins_Users_FK" FOREIGN KEY ("UserID") REFERENCES "Users"("UserID"); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | COMMIT TRANSACTION; | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user