DB error: 1364 Field 'path' doesn't have a default value #47

Closed
opened 2020-06-21 11:08:22 +02:00 by AlfredSK · 4 comments
AlfredSK commented 2020-06-21 11:08:22 +02:00 (Migrated from github.com)

I had a look at the log of my directory instance and found a lot of DB errors because the field 'path' doesn't have a default value.

ERROR {"uid":"4b22814"}: SQLSTATE[HY000]: General error: 1364 Field 'path' doesn't have a default value: 
#0 .../vendor/atlas/pdo/src/Connection.php(138): PDOStatement->execute() 
#1 .../src/classes/Pollers/Server.php(106): Atlas\Pdo\Connection->perform('INSERT INTO `se...', Array) 
#2 .../src/classes/Controllers/Cron.php(148): Friendica\Directory\Pollers\Server->__invoke('https://sendero...') 
#3 .../src/classes/Controllers/Cron.php(77): Friendica\Directory\Controllers\Cron->pollServers(24) 
#4 .../bin/cron.php(22): Friendica\Directory\Controllers\Cron->execute() 
#5 {main} []

Directory 2.3.1 (but showing 2.3.0 at the page footer)
PHP 7.3
MariaDB 10.3
Database schema migrated to version 5

I had a look at the log of my directory instance and found a lot of DB errors because the field 'path' doesn't have a default value. ``` ERROR {"uid":"4b22814"}: SQLSTATE[HY000]: General error: 1364 Field 'path' doesn't have a default value: #0 .../vendor/atlas/pdo/src/Connection.php(138): PDOStatement->execute() #1 .../src/classes/Pollers/Server.php(106): Atlas\Pdo\Connection->perform('INSERT INTO `se...', Array) #2 .../src/classes/Controllers/Cron.php(148): Friendica\Directory\Pollers\Server->__invoke('https://sendero...') #3 .../src/classes/Controllers/Cron.php(77): Friendica\Directory\Controllers\Cron->pollServers(24) #4 .../bin/cron.php(22): Friendica\Directory\Controllers\Cron->execute() #5 {main} [] ``` Directory 2.3.1 (but showing 2.3.0 at the page footer) PHP 7.3 MariaDB 10.3 Database schema migrated to version 5
realkinetix commented 2020-09-16 05:50:25 +02:00 (Migrated from github.com)

After a bit of grepping and trying to figure out if/when/how/why there should be data in the path column, I've removed the column. That's got me on to the next issue, I think. I will likely have to file a bug for the next bit.

I have the feeling something's off with the db schema presently?

After a bit of grepping and trying to figure out if/when/how/why there should be data in the path column, I've removed the column. That's got me on to the next issue, I think. I will likely have to file a bug for the next bit. I have the feeling something's off with the db schema presently?
MrPetovan commented 2020-09-16 11:19:57 +02:00 (Migrated from github.com)

It's entirely possible, what's the bug you are talking about?

It's entirely possible, what's the bug you are talking about?
realkinetix commented 2020-09-16 16:05:51 +02:00 (Migrated from github.com)

Oh, heh! Perhaps I should have followed up on this one. The other issue is #48 - and I'm not sure that one has anything to do with the schema at all.

Oh, heh! Perhaps I should have followed up on this one. The other issue is #48 - and I'm not sure that one has anything to do with the schema at all.
MrPetovan commented 2020-09-26 22:58:12 +02:00 (Migrated from github.com)

The solution is to add a default value to the field. I'm preparing a new database migration version that drops this field and it will fail if the field doesn't exist anymore.

The solution is to add a default value to the field. I'm preparing a new database migration version that drops this field and it will fail if the field doesn't exist anymore.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: friendica/friendica-directory#47
No description provided.