feat: add edit, delete and image input
This commit is contained in:
parent
421543f0c7
commit
3de7ae2fe9
12 changed files with 545 additions and 139 deletions
33
migrations/1635159374499-editable-customer-data.js
Normal file
33
migrations/1635159374499-editable-customer-data.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
const db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
`CREATE TABLE edited_customer_data (
|
||||
customer_id uuid PRIMARY KEY REFERENCES customers(id),
|
||||
id_card_data JSON,
|
||||
id_card_data_edited_at TIMESTAMPTZ,
|
||||
id_card_data_edited_by UUID REFERENCES users(id),
|
||||
front_camera_path TEXT,
|
||||
front_camera_edited_at TIMESTAMPTZ,
|
||||
front_camera_edited_by UUID REFERENCES users(id),
|
||||
id_card_photo_path TEXT,
|
||||
id_card_photo_edited_at TIMESTAMPTZ,
|
||||
id_card_photo_edited_by UUID REFERENCES users(id),
|
||||
subscriber_info JSON,
|
||||
subscriber_info_edited_at TIMESTAMPTZ,
|
||||
subscriber_info_edited_by UUID REFERENCES users(id),
|
||||
name TEXT,
|
||||
name_info_edited_at TIMESTAMPTZ,
|
||||
name_info_edited_by UUID REFERENCES users(id),
|
||||
us_ssn TEXT,
|
||||
us_ssn_edited_at TIMESTAMPTZ,
|
||||
us_ssn_edited_by UUID REFERENCES users(id),
|
||||
created TIMESTAMPTZ NOT NULL DEFAULT now() )`
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue