]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use schemaDef when checking database structure
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 30 Oct 2013 13:17:54 +0000 (14:17 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 30 Oct 2013 13:17:54 +0000 (14:17 +0100)
plugins/Bookmark/BookmarkPlugin.php

index 6461227f9807d6bf651110a74ff571dbfbfab64c..19ae8e9ae9a019fc57425d8a7637c232f6605cb1 100644 (file)
@@ -80,39 +80,7 @@ class BookmarkPlugin extends MicroAppPlugin
     {
         $schema = Schema::get();
 
-        // For storing user-submitted flags on profiles
-
-        $schema->ensureTable('bookmark',
-                             array(new ColumnDef('id',
-                                                 'char',
-                                                 36,
-                                                 false,
-                                                 'PRI'),
-                                   new ColumnDef('profile_id',
-                                                 'integer',
-                                                 null,
-                                                 false,
-                                                 'MUL'),
-                                   new ColumnDef('url',
-                                                 'varchar',
-                                                 255,
-                                                 false,
-                                                 'MUL'),
-                                   new ColumnDef('title',
-                                                 'varchar',
-                                                 255),
-                                   new ColumnDef('description',
-                                                 'text'),
-                                   new ColumnDef('uri',
-                                                 'varchar',
-                                                 255,
-                                                 false,
-                                                 'UNI'),
-                                   new ColumnDef('created',
-                                                 'datetime',
-                                                 null,
-                                                 false,
-                                                 'MUL')));
+        $schema->ensureTable('bookmark', Bookmark::schemaDef());
 
         return true;
     }