Files
database/migrations/archive/000.477.sql
T
Rikard BartholfandGitHub ddcbd0afb0 Archive old migrations (#426)
* Archive old migrations

* Fix invalid placement of migrations
2024-10-17 11:19:12 +02:00

20 lines
645 B
SQL

-- Create carts table
DROP TABLE IF EXISTS adyen_sessions;
CREATE TABLE adyen_sessions (
id SERIAL PRIMARY KEY,
cart_id TEXT NOT NULL,
adyen_session_id TEXT,
content JSONB NOT NULL,
payment_complete_response TEXT,
authorisation_webhook TEXT,
status TEXT NOT NULL DEFAULT 'created',
order_id INTEGER REFERENCES orders(id),
inserted TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
updated TIMESTAMP WITH TIME ZONE
);
CREATE TRIGGER updated_timestamp BEFORE UPDATE ON adyen_sessions FOR EACH ROW EXECUTE FUNCTION updated_timestamp();
ALTER TABLE orders ADD COLUMN delivery_method_name TEXT DEFAULT NULL;