22 lines
470 B
MySQL
22 lines
470 B
MySQL
|
-- SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||
|
--
|
||
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||
|
|
||
|
ALTER TABLE items
|
||
|
ADD created_at TIMESTAMP WITH TIME ZONE DEFAULT now();
|
||
|
|
||
|
UPDATE items
|
||
|
SET created_at = now();
|
||
|
|
||
|
ALTER TABLE items
|
||
|
ALTER created_at SET NOT NULL;
|
||
|
|
||
|
ALTER TABLE item_classes
|
||
|
ADD created_at TIMESTAMP WITH TIME ZONE DEFAULT now();
|
||
|
|
||
|
UPDATE item_classes
|
||
|
SET created_at = now();
|
||
|
|
||
|
ALTER TABLE item_classes
|
||
|
ALTER created_at SET NOT NULL;
|