feat(bookings): allow editing and soft-deleting bookings
Add edit modal to update guest details, ticket selection, and quantity Implement soft delete functionality to archive bookings
This commit is contained in:
@@ -287,6 +287,7 @@ async function initializeDatabase() {
|
||||
remark text,
|
||||
status text not null default 'pending',
|
||||
confirmed_at timestamptz,
|
||||
deleted_at timestamptz,
|
||||
created_at timestamptz not null default now(),
|
||||
updated_at timestamptz not null default now()
|
||||
)
|
||||
@@ -322,6 +323,11 @@ async function initializeDatabase() {
|
||||
add column if not exists locale text not null default 'en'
|
||||
`
|
||||
|
||||
await sql`
|
||||
alter table bookings
|
||||
add column if not exists deleted_at timestamptz
|
||||
`
|
||||
|
||||
await sql`
|
||||
create unique index if not exists bookings_receipt_token_idx
|
||||
on bookings (receipt_token)
|
||||
@@ -342,6 +348,11 @@ async function initializeDatabase() {
|
||||
on bookings (ticket_type_id)
|
||||
`
|
||||
|
||||
await sql`
|
||||
create index if not exists bookings_deleted_at_idx
|
||||
on bookings (deleted_at)
|
||||
`
|
||||
|
||||
await sql`
|
||||
create table if not exists booking_seats (
|
||||
id text primary key,
|
||||
|
||||
Reference in New Issue
Block a user