diff options
author | Evan Prodromou <evan@status.net> | 2010-11-14 06:49:43 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-11-14 06:49:43 -0500 |
commit | 01f32e3998b8d031d2a39e2d0506253142b6632e (patch) | |
tree | 952174eeb2fa746c97b9884cf4797ffa3f9870ce /plugins/Sample | |
parent | c4b8f68a1a3ed6422a2ed1cb7a8b5b5c65011b5f (diff) | |
parent | b716d01a41c54c06676a1e54a48c36e05755a247 (diff) |
Merge remote branch 'gitorious/1.0.x' into 1.0.x
Conflicts:
actions/urlsettings.php
Diffstat (limited to 'plugins/Sample')
-rw-r--r-- | plugins/Sample/SamplePlugin.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/Sample/SamplePlugin.php b/plugins/Sample/SamplePlugin.php index ef69121a9..a0d1140f3 100644 --- a/plugins/Sample/SamplePlugin.php +++ b/plugins/Sample/SamplePlugin.php @@ -172,9 +172,20 @@ class SamplePlugin extends Plugin // For storing user-submitted flags on profiles $schema->ensureTable('user_greeting_count', - array(new ColumnDef('user_id', 'integer', null, - true, 'PRI'), - new ColumnDef('greeting_count', 'integer'))); + array( + 'fields' => array( + 'user_id' => array('type' => 'int', 'not null' => true), + 'greeting_count' => array('type' => 'int'), + ), + 'primary key' => array('user_id'), + 'foreign keys' => array( + // Not all databases will support foreign keys, but even + // when not enforced it's helpful to include these definitions + // as documentation. + 'user_greeting_count_user_id_fkey' => array('user', array('user_id' => 'id')), + ), + ) + ); return true; } |