]> git.mxchange.org Git - friendica.git/commitdiff
Make updated_at not nullable, it should get set at the creation as well
authorPhilipp <admin@philipp.info>
Fri, 30 Dec 2022 16:15:15 +0000 (17:15 +0100)
committerPhilipp <admin@philipp.info>
Fri, 30 Dec 2022 16:15:15 +0000 (17:15 +0100)
database.sql
doc/database/db_key-value.md
static/dbstructure.config.php

index b7d4ac35d938dcb1ad0c1f78b2f51fa2c4760a21..2ae33689c19ca53cd75d0b3d3a5bd2cc0774ddc6 100644 (file)
@@ -845,7 +845,7 @@ CREATE TABLE IF NOT EXISTS `intro` (
 CREATE TABLE IF NOT EXISTS `key-value` (
        `k` varbinary(50) NOT NULL COMMENT '',
        `v` mediumtext COMMENT '',
-       `updated_at` int unsigned COMMENT 'timestamp of the last update',
+       `updated_at` int unsigned NOT NULL COMMENT 'timestamp of the last update',
         PRIMARY KEY(`k`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='A key value storage';
 
index 514fdaa698f9d8cc8d99be02781b8020ca2101e0..2ed3baa48cf2688570331bf39f524206115614dc 100644 (file)
@@ -10,7 +10,7 @@ Fields
 | ---------- | ---------------------------- | ------------- | ---- | --- | ------- | ----- |
 | k          |                              | varbinary(50) | NO   | PRI | NULL    |       |
 | v          |                              | mediumtext    | YES  |     | NULL    |       |
-| updated_at | timestamp of the last update | int unsigned  | YES  |     | NULL    |       |
+| updated_at | timestamp of the last update | int unsigned  | NO   |     | NULL    |       |
 
 Indexes
 ------------
index 7ced8172fbe2073bc9dd1c27c191891b7e86d80b..25e416d5085380fcf8fcce3525d5322e36907212 100644 (file)
@@ -894,7 +894,7 @@ return [
                "fields" => [
                        "k" => ["type" => "varbinary(50)", "not null" => "1", "primary" => "1", "comment" => ""],
                        "v" => ["type" => "mediumtext", "comment" => ""],
-                       "updated_at" => ["type" => "int unsigned", "comment" => "timestamp of the last update"],
+                       "updated_at" => ["type" => "int unsigned", "not null" => "1", "comment" => "timestamp of the last update"],
                ],
                "indexes" => [
                        "PRIMARY" => ["k"],