forked from GNUsocial/gnu-social
[Embed][DB] Renaming the 'file_oembed' table to 'file_embed' on upgrade
This commit is contained in:
committed by
Diogo Cordeiro
parent
52819d39d9
commit
2a2b3f72fb
@@ -73,11 +73,19 @@ class EmbedPlugin extends Plugin
|
||||
*/
|
||||
public function onCheckSchema()
|
||||
{
|
||||
$this->onEndUpgrade(); // Ensure rename
|
||||
|
||||
$schema = Schema::get();
|
||||
$schema->ensureTable('file_oembed', File_oembed::schemaDef());
|
||||
$schema->ensureTable('file_embed', File_embed::schemaDef());
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onEndUpgrade()
|
||||
{
|
||||
$schema = Schema::get();
|
||||
return $schema->renameTable('file_oembed', 'file_embed');
|
||||
}
|
||||
|
||||
/**
|
||||
* This code executes when GNU social creates the page routing, and we hook
|
||||
* on this event to add our action handler for Embed.
|
||||
|
Reference in New Issue
Block a user