mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:40:15 +00:00
Moved database structure
This commit is contained in:
parent
901c3f4855
commit
dfe1d53342
2 changed files with 25 additions and 25 deletions
24
database.sql
24
database.sql
|
@ -94,6 +94,18 @@ CREATE TABLE IF NOT EXISTS `user` (
|
||||||
FOREIGN KEY (`parent-uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
|
FOREIGN KEY (`parent-uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
|
||||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='The local users';
|
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='The local users';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- TABLE item-uri
|
||||||
|
--
|
||||||
|
CREATE TABLE IF NOT EXISTS `item-uri` (
|
||||||
|
`id` int unsigned NOT NULL auto_increment,
|
||||||
|
`uri` varbinary(255) NOT NULL COMMENT 'URI of an item',
|
||||||
|
`guid` varbinary(255) COMMENT 'A unique identifier for an item',
|
||||||
|
PRIMARY KEY(`id`),
|
||||||
|
UNIQUE INDEX `uri` (`uri`),
|
||||||
|
INDEX `guid` (`guid`)
|
||||||
|
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='URI and GUID for items';
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE contact
|
-- TABLE contact
|
||||||
--
|
--
|
||||||
|
@ -209,18 +221,6 @@ CREATE TABLE IF NOT EXISTS `contact` (
|
||||||
FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
|
FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
|
||||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='contact table';
|
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='contact table';
|
||||||
|
|
||||||
--
|
|
||||||
-- TABLE item-uri
|
|
||||||
--
|
|
||||||
CREATE TABLE IF NOT EXISTS `item-uri` (
|
|
||||||
`id` int unsigned NOT NULL auto_increment,
|
|
||||||
`uri` varbinary(255) NOT NULL COMMENT 'URI of an item',
|
|
||||||
`guid` varbinary(255) COMMENT 'A unique identifier for an item',
|
|
||||||
PRIMARY KEY(`id`),
|
|
||||||
UNIQUE INDEX `uri` (`uri`),
|
|
||||||
INDEX `guid` (`guid`)
|
|
||||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='URI and GUID for items';
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TABLE tag
|
-- TABLE tag
|
||||||
--
|
--
|
||||||
|
|
|
@ -152,6 +152,19 @@ return [
|
||||||
"email" => ["email(64)"],
|
"email" => ["email(64)"],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"item-uri" => [
|
||||||
|
"comment" => "URI and GUID for items",
|
||||||
|
"fields" => [
|
||||||
|
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
|
||||||
|
"uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
|
||||||
|
"guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
|
||||||
|
],
|
||||||
|
"indexes" => [
|
||||||
|
"PRIMARY" => ["id"],
|
||||||
|
"uri" => ["UNIQUE", "uri"],
|
||||||
|
"guid" => ["guid"]
|
||||||
|
]
|
||||||
|
],
|
||||||
"contact" => [
|
"contact" => [
|
||||||
"comment" => "contact table",
|
"comment" => "contact table",
|
||||||
"fields" => [
|
"fields" => [
|
||||||
|
@ -265,19 +278,6 @@ return [
|
||||||
"uri-id" => ["uri-id"],
|
"uri-id" => ["uri-id"],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"item-uri" => [
|
|
||||||
"comment" => "URI and GUID for items",
|
|
||||||
"fields" => [
|
|
||||||
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
|
|
||||||
"uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
|
|
||||||
"guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
|
|
||||||
],
|
|
||||||
"indexes" => [
|
|
||||||
"PRIMARY" => ["id"],
|
|
||||||
"uri" => ["UNIQUE", "uri"],
|
|
||||||
"guid" => ["guid"]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"tag" => [
|
"tag" => [
|
||||||
"comment" => "tags and mentions",
|
"comment" => "tags and mentions",
|
||||||
"fields" => [
|
"fields" => [
|
||||||
|
|
Loading…
Reference in a new issue