Search
Items tagged with: database
Question for the #MySQL / #MariaDB buffs, I have three tables defined thus:
Running the last query triggers the error
#SQL #Database #DBA
CREATE TABLE IF NOT EXISTS `user` (
`uid` mediumint unsigned NOT NULL auto_increment COMMENT 'sequential ID',
...
PRIMARY KEY(`uid`)
);
CREATE TABLE IF NOT EXISTS `gserver` (
`id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
...
PRIMARY KEY(`id`)
);
CREATE TABLE IF NOT EXISTS `user-gserver` (
`uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id',
`gsid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Gserver id',
...
PRIMARY KEY(`uid`,`gsid`),
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
);
Running the last query triggers the error
Foreign key constraint is incorrectly formed
. Is there no way to reference multiple tables in foreign keys out of a compound primary key?#SQL #Database #DBA
Sadly I don't think I'm going to be able to continue to run #Soapbox. At least not integrated into #Pleroma (now #Akkoma).
Soapbox insists on having the #config be in the #database but when that's set Pleroma/Akkoma refuses to start.
Anyways, too tired right now to mess with it. Will have to look into it more tomorrow.
Soapbox insists on having the #config be in the #database but when that's set Pleroma/Akkoma refuses to start.
Anyways, too tired right now to mess with it. Will have to look into it more tomorrow.
Database size
Hello !Friendica Support,
about a week ago my database grew massively, from about 11GB to over 20GB. I assume that it is related to this pull-request (10484). Is this normal or is there something that did not work properly when updating the database?
#Friendica #database
about a week ago my database grew massively, from about 11GB to over 20GB. I assume that it is related to this pull-request (10484). Is this normal or is there something that did not work properly when updating the database?
#Friendica #database
Database Cleanup
Hello @Friendica Support,
how can I check if the database cleanup works even if I have enabled database cleanup in the settings? My Databas is growing and growing an i do not know, why.
#friendica #database
how can I check if the database cleanup works even if I have enabled database cleanup in the settings? My Databas is growing and growing an i do not know, why.
#friendica #database