更新 資料庫修改紀錄.txt
This commit is contained in:
+30
-6
@@ -1,17 +1,41 @@
|
||||
FK 規則更新
|
||||
FK_act_bom_actItem1 刪除規則設為 cascade
|
||||
FK_pro_order_followers 刪除規則設為 cascade
|
||||
FK_pro_order_activity 刪除規則設為 cascade
|
||||
FK_pro_order_detail_pro_order 刪除規則設為 cascade
|
||||
FK_pro_order_detail_followers 刪除規則設為 沒有動作
|
||||
FK_activity_relating_activity 刪除規則設為 cascade
|
||||
|
||||
FK_pro_order_auto_enroll 刪除規則設為 NULL
|
||||
------------------------------------------------------------
|
||||
資料表欄位更新
|
||||
actitem 加上 sort_order(int) 欄位
|
||||
activity_relating 加上 has_yang_limit(bit) 欄位
|
||||
activity_relating 加上 has_chao_limit(bit) 欄位
|
||||
activity_relating 加上 yang_limit_count(int) 欄位
|
||||
activity_relating 加上 chao_limit_count(int) 欄位
|
||||
follower 加上 is_auto_enroll(bit) 欄位
|
||||
follower 加上 auto_enroll_start_date(datetime) 欄位
|
||||
follower 加上 auto_enroll_receipt_title(nvarchar(50)) 欄位
|
||||
follower 加上 auto_enroll_receipt_address(nvarchar(200)) 欄位
|
||||
follower 加上 auto_enroll_is_receipt(bit) 欄位
|
||||
company 加上 last_auto_order_no(nvarchar(20)) 欄位
|
||||
pro_order 加上 au_num(int) 欄位 並加上 constraint:
|
||||
ALTER TABLE pro_order
|
||||
ADD CONSTRAINT FK_pro_order_auto_enroll
|
||||
FOREIGN KEY (au_num) REFERENCES auto_enroll(num);
|
||||
------------------------------------------------------------
|
||||
新增資料表 auto_enroll
|
||||
num int 不允許 Null
|
||||
f_num int 不允許 Null
|
||||
start_date date 允許 Null
|
||||
end_date date 允許 Null
|
||||
receipt_title nvarchar(MAX) 允許 Null
|
||||
receipt_address nchar(200) 不允許 Null
|
||||
|
||||
設定主鍵
|
||||
ALTER TABLE [dbo].[auto_enroll]
|
||||
ADD CONSTRAINT PK_auto_enroll PRIMARY KEY (num);
|
||||
|
||||
設定外鍵
|
||||
ALTER TABLE auto_enroll
|
||||
ADD CONSTRAINT FK_auto_enroll_followers
|
||||
FOREIGN KEY (f_num) REFERENCES followers(num);
|
||||
|
||||
Model.edmx 設定
|
||||
1. num 識別規格設為 是
|
||||
2. Model.edmx auto_enroll.num 屬性 StoreGeneratedPattern 設為 Identity
|
||||
Reference in New Issue
Block a user