[CORE] Data Representation and Modelling refactor

This commit is contained in:
Hugo Sales
2020-08-12 23:57:22 +00:00
committed by Hugo Sales
parent b80479dc4e
commit 1111ee95f1
22 changed files with 155 additions and 422 deletions

View File

@@ -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']]],
];
}
}