create msg_rules_v
This commit is contained in:
parent
52000472bb
commit
e2c8e45bbe
12
sql.go
12
sql.go
@ -294,6 +294,18 @@ func initDB() {
|
||||
failOnError(err, "initDB : create table msg_rules")
|
||||
log.Println("initDB : msg_rules created ...")
|
||||
|
||||
_, err = db.Exec(`CREATE VIEW msg_rules_v AS
|
||||
SELECT r.id
|
||||
,r.prio
|
||||
,r.descn COLLATE utf8mb4_unicode_ci AS descn
|
||||
,r.rule COLLATE utf8mb4_unicode_ci AS rule
|
||||
,cost.intl_id AS msg_type
|
||||
FROM msg_rule r
|
||||
,code_obj_sub_type cost
|
||||
WHERE cost.id = r.msg_type_id;`)
|
||||
failOnError(err, "initDB : create table msg_rules_v")
|
||||
log.Println("initDB : msg_rules created ...")
|
||||
|
||||
_, err = db.Exec(`CREATE TABLE obj_item (
|
||||
obj_id BIGINT UNSIGNED NOT NULL
|
||||
,intl_id VARCHAR(32)
|
||||
|
Loading…
Reference in New Issue
Block a user