File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+ /**
3+ * @link https://github.com/monarc-project for the canonical source repository
4+ * @copyright Copyright (c) 2016-2025 Luxembourg House of Cybersecurity LHC.lu - Licensed under GNU Affero GPL v3
5+ * @license MONARC is licensed under GNU Affero General Public License version 3
6+ */
7+
8+ use Phinx \Migration \AbstractMigration ;
9+
10+ class CreateActionsHistoryTable extends AbstractMigration
11+ {
12+ public function change ()
13+ {
14+ $ this ->execute (
15+ 'CREATE TABLE IF NOT EXISTS `actions_history` (
16+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
17+ `user_id` int(11) unsigned DEFAULT NULL,
18+ `action` varchar(100) NOT NULL,
19+ `data` TEXT,
20+ `status` smallint(3) unsigned NOT NULL DEFAULT 0,
21+ `creator` varchar(255) NOT NULL,
22+ `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
23+ PRIMARY KEY (`id`),
24+ CONSTRAINT `actions_history_user_id_id_fk1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL); '
25+ );
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments