add migrate schema for lead target
This commit is contained in:
parent
4b0f100655
commit
0b725ece22
2
dal/schema/000014_init.down.sql
Normal file
2
dal/schema/000014_init.down.sql
Normal file
@ -0,0 +1,2 @@
|
||||
ALTER TABLE account ADD column email varchar(50) NOT NULL default '';
|
||||
DROP TABLE IF EXISTS leadtarget;
|
11
dal/schema/000014_init.up.sql
Normal file
11
dal/schema/000014_init.up.sql
Normal file
@ -0,0 +1,11 @@
|
||||
AlTER TABLE account DROP column email;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS leadtarget(
|
||||
ID BIGSERIAL UNIQUE NOT NULL PRIMARY KEY,
|
||||
AccountID varchar(30) NOT NULL,
|
||||
Type varchar(50) NOT NULL,
|
||||
QuizID integer NOT NULL DEFAULT 0,
|
||||
Target text NOT NULL,
|
||||
Deleted boolean NOT NULL DEFAULT false,
|
||||
CreatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
@ -308,3 +308,13 @@ type AnswerExport struct {
|
||||
}
|
||||
|
||||
type UTMSavingMap map[string]string
|
||||
|
||||
type LeadTarget struct {
|
||||
ID int64 `json:"id"`
|
||||
AccountID string `json:"accountID"`
|
||||
Type string `json:"type"`
|
||||
QuizID int32 `json:"quizID"`
|
||||
Target string `json:"target"`
|
||||
Deleted bool `json:"deleted"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ packages:
|
||||
- "./dal/schema/000012_init.down.sql"
|
||||
- "./dal/schema/000013_init.up.sql"
|
||||
- "./dal/schema/000013_init.down.sql"
|
||||
- "./dal/schema/000014_init.up.sql"
|
||||
- "./dal/schema/000014_init.down.sql"
|
||||
engine: "postgresql"
|
||||
emit_json_tags: true
|
||||
emit_db_tags: true
|
||||
|
Loading…
Reference in New Issue
Block a user