diff --git a/components/Bridge/Entity/ForeignLink.php b/components/Bridge/Entity/ForeignLink.php index f3617c6ee6..c73d8c4c4c 100644 --- a/components/Bridge/Entity/ForeignLink.php +++ b/components/Bridge/Entity/ForeignLink.php @@ -188,7 +188,7 @@ class ForeignLink 'profilesync' => ['type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming'], 'last_noticesync' => ['type' => 'datetime', 'description' => 'last time notices were imported'], 'last_friendsync' => ['type' => 'datetime', 'description' => 'last time friends were imported'], - 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'], + 'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'], 'modified' => ['type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'], ], 'primary key' => ['user_id', 'foreign_id', 'service'], diff --git a/components/Bridge/Entity/ForeignService.php b/components/Bridge/Entity/ForeignService.php index 7b4c47f02d..649cd4d35d 100644 --- a/components/Bridge/Entity/ForeignService.php +++ b/components/Bridge/Entity/ForeignService.php @@ -110,7 +110,7 @@ class ForeignService 'id' => ['type' => 'int', 'not null' => true, 'description' => 'numeric key for service'], 'name' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'name of the service'], 'description' => ['type' => 'varchar', 'length' => 191, 'description' => 'description'], - 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'], + 'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'], 'modified' => ['type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'], ], 'primary key' => ['id'], diff --git a/components/Bridge/Entity/ForeignSubscription.php b/components/Bridge/Entity/ForeignSubscription.php index 0e7af40ee9..8685b992c5 100644 --- a/components/Bridge/Entity/ForeignSubscription.php +++ b/components/Bridge/Entity/ForeignSubscription.php @@ -99,7 +99,7 @@ class ForeignSubscription 'service' => ['type' => 'int', 'not null' => true, 'description' => 'service where relationship happens'], 'subscriber' => ['type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'subscriber on foreign service'], 'subscribed' => ['type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'subscribed user'], - 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'], + 'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'], ], 'primary key' => ['service', 'subscriber', 'subscribed'], 'foreign keys' => [ diff --git a/components/Bridge/Entity/ForeignUser.php b/components/Bridge/Entity/ForeignUser.php index 857e19854a..ff91d99cec 100644 --- a/components/Bridge/Entity/ForeignUser.php +++ b/components/Bridge/Entity/ForeignUser.php @@ -123,7 +123,7 @@ class ForeignUser 'service' => ['type' => 'int', 'not null' => true, 'description' => 'foreign key to service'], 'uri' => ['type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'identifying URI'], 'nickname' => ['type' => 'varchar', 'length' => 191, 'description' => 'nickname on foreign service'], - 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'], + 'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'], 'modified' => ['type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'], ], 'primary key' => ['id', 'service'],