| 1 |
<?php |
<?php |
| 2 |
// $Id: ejournal.install,v 1.1.4.13.2.7 2009/02/06 14:55:27 nobios Exp $ |
// $Id: ejournal.install,v 1.1.4.13.2.8 2009/04/25 13:39:30 romca Exp $ |
| 3 |
|
|
| 4 |
function ejournal_schema() { |
function ejournal_schema() { |
| 5 |
$schema['ejournal_articles'] = array( |
$schema['ejournal_articles'] = array( |
| 142 |
function ejournal_update_2() { |
function ejournal_update_2() { |
| 143 |
$ret = array(); |
$ret = array(); |
| 144 |
|
|
| 145 |
$ret[] = update_sql("alter table {ejournal_articles_log} ,change `id` `lid` int (9) NOT NULL AUTO_INCREMENT , change `nid` `id` int (9) NOT NULL , change `iid` `entity` varchar (16) NOT NULL "); |
$ret[] = update_sql("alter table {ejournal_articles_log} change `id` `lid` int (9) NOT NULL AUTO_INCREMENT"); |
| 146 |
|
$ret[] = update_sql("alter table {ejournal_articles_log} change `nid` `id` int (9) NOT NULL"); |
| 147 |
|
$ret[] = update_sql("alter table {ejournal_articles_log} change `iid` `entity` varchar (16) NOT NULL "); |
| 148 |
db_rename_table($ret, 'ejournal_articles_log', 'ejournal_log'); |
db_rename_table($ret, 'ejournal_articles_log', 'ejournal_log'); |
| 149 |
$ret[] = update_sql("update {ejournal_log} set message=concat(message, ' (iid: ', `entity`, ')')"); |
$ret[] = update_sql("update {ejournal_log} set message=concat(message, ' (iid: ', `entity`, ')')"); |
| 150 |
$ret[] = update_sql("update {ejournal_log} set type='notice' where type='message'"); |
$ret[] = update_sql("update {ejournal_log} set type='notice' where type='message'"); |