forked from GNUsocial/gnu-social
[CORE] Data Representation and Modelling refactor
This commit is contained in:
@@ -105,16 +105,13 @@ class Conversation
|
||||
return [
|
||||
'name' => 'conversation',
|
||||
'fields' => [
|
||||
'id' => ['type' => 'serial', 'not null' => true, 'description' => 'Unique identifier, (again) unrelated to notice id since 2016-01-06'],
|
||||
'uri' => ['type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'URI of the conversation'],
|
||||
'url' => ['type' => 'varchar', 'length' => 191, 'description' => 'Resolvable URL, preferably remote (local can be generated on the fly)'],
|
||||
'id' => ['type' => 'serial', 'not null' => true, 'description' => 'Unique identifier'],
|
||||
'note_id' => ['type' => 'int', 'not null' => true, 'description' => 'Root of note for this conversation'],
|
||||
'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'],
|
||||
'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
|
||||
],
|
||||
'primary key' => ['id'],
|
||||
'unique keys' => [
|
||||
'conversation_uri_key' => ['uri'],
|
||||
],
|
||||
'primary key' => ['id'],
|
||||
'foreign keys' => ['conversation_note_id_fkey' => ['note', ['note_id' => 'id']]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user