diff --git a/sql/.vs/sql/v14/.ssms_suo b/sql/.vs/sql/v14/.ssms_suo index 77b37ea..b2ee033 100644 Binary files a/sql/.vs/sql/v14/.ssms_suo and b/sql/.vs/sql/v14/.ssms_suo differ diff --git a/sql/sql/setup_02_create_table.sql b/sql/sql/setup_02_create_table.sql index 23404aa..d7de0a7 100644 --- a/sql/sql/setup_02_create_table.sql +++ b/sql/sql/setup_02_create_table.sql @@ -12,7 +12,7 @@ use marketdb; if not exists (select * from sysobjects where name='commercials') CREATE TABLE commercials ( commercial_id int identity not null, - date_since_last_change date not null, + date_since_last_change date default getdate(), member_id int not null, constraint commercial_pk primary key (commercial_id) ); @@ -49,7 +49,7 @@ if not exists (select * from sysobjects where name='subscption_orders') CREATE TABLE subscption_orders ( subscription_order_id int identity not null, running_subscription bit, - subscription_order_date date not null, + subscription_order_date date default getdate(), subscription_id int not null, member_id int not null, location_id int not null, @@ -63,7 +63,7 @@ if not exists (select * from sysobjects where name='members') email_address varchar(50) not null, password varchar(50) not null, member_status_id int not null, - date_of_registration date not null, + date_of_registration date default getdate(), person_id int, signed_agb bit null, passed_credit_check bit null, @@ -127,7 +127,7 @@ use marketdb; if not exists (select * from sysobjects where name='rents') CREATE TABLE rents ( rent_id int identity not null, - rent_date date not null, + rent_date date default getdate(), payment_date date not null, member_id int not null, rent_price_id int not null diff --git a/sql/sql/setup_03_insert_data.sql b/sql/sql/setup_03_insert_data.sql index 0a072d7..9743963 100644 --- a/sql/sql/setup_03_insert_data.sql +++ b/sql/sql/setup_03_insert_data.sql @@ -4658,18 +4658,16 @@ values (1,'Max','Muster','1989-07-31','Musterstrasse',3,4,1), use marketdb; insert into dbo.members (email_address, password, - member_status_id, - date_of_registration) -values ('test_member@gmail.com',123456,1,'2017-07-08'), - ('full_member@gmail.com',123456,2,'2017-07-08'); + member_status_id) +values ('test_member@gmail.com',123456,1), + ('full_member@gmail.com',123456,2); -- insert member with person reference use marketdb; insert into dbo.members (email_address, password, member_status_id, - date_of_registration, person_id) -values ('person@gmail.com',123456,2,'2017-07-08',1), - ('hannah.muster@gmail.com0',123456,3,'2017-07-20',2); +values ('person@gmail.com',123456,2,1), + ('hannah.muster@gmail.com0',123456,3,2);