]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - db/core.php
Merge branch 'master' into testing
[quix0rs-gnu-social.git] / db / core.php
1 <?php
2
3 /**
4  *
5  * Some notes...
6  *
7  * Drupal docs don't list a bool type, but it might be nice to use rather than 'tinyint'
8  * Note however that we use bitfields and things as well in tinyints, and PG's
9  * "bool" type isn't 100% compatible with 0/1 checks. Just keeping tinyints. :)
10  *
11  * decimal <-> numeric
12  *
13  * MySQL 'timestamp' columns were formerly used for 'modified' files for their
14  * auto-updating properties. This didn't play well with changes to cache usage
15  * in 0.9.x, as we don't know the timestamp value at INSERT time and never
16  * have a chance to load it up again before caching. For now I'm leaving them
17  * in, but we may want to clean them up later.
18  *
19  * Current code should be setting 'created' and 'modified' fields explicitly;
20  * this also avoids mismatches between server and client timezone settings.
21  *
22  *
23  * fulltext indexes?
24  * got one or two things wanting a custom charset setting on a field?
25  *
26  * foreign keys are kinda funky...
27  *     those specified in inline syntax (as all in the original .sql) are NEVER ENFORCED on mysql
28  *     those made with an explicit 'foreign key' WITHIN INNODB and IF there's a proper index, do get enforced
29  *     double-check what we've been doing on postgres?
30  */
31
32 $classes = array('Profile',
33                  'Avatar',
34                  'Sms_carrier',
35                  'User',
36                  'Remote_profile',
37                  'Subscription',
38                  'Group_join_queue',
39                  'Subscription_queue',
40                  'Oauth_token_association',
41                  'Notice',
42                  'Notice_source',
43                  'Reply',
44                  'Fave',
45                  'Consumer',
46                  'Token',
47                  'Nonce',
48                  'Oauth_application',
49                  'Oauth_application_user',
50                  'Confirm_address',
51                  'Remember_me',
52                  'Queue_item',
53                  'Notice_tag',
54                  'Foreign_service',
55                  'Foreign_user',
56                  'Foreign_link',
57                  'Foreign_subscription',
58                  'Invitation',
59                  'Message',
60                  // 'Notice_inbox',
61                  'Profile_tag',
62                  'Profile_list',
63                  'Profile_tag_subscription',
64                  'Profile_block',
65                  'User_group',
66                  'Related_group',
67                  'Group_inbox',
68                  'Group_member',
69                  'File',
70                  'File_oembed',
71                  'File_redirection',
72                  'File_thumbnail',
73                  'File_to_post',
74                  'Group_block',
75                  'Group_alias',
76                  'Session',
77                  'Deleted_notice',
78                  'Config',
79                  'Profile_role',
80                  'Location_namespace',
81                  'Login_token',
82                  'User_location_prefs',
83                  'Inbox',
84                  'User_im_prefs',
85                  'Conversation',
86                  'Local_group',
87                  'User_urlshortener_prefs',
88                  'Schema_version',
89 );
90
91 foreach ($classes as $cls) {
92     $schema[strtolower($cls)] = call_user_func(array($cls, 'schemaDef'));
93 }