-
Notifications
You must be signed in to change notification settings - Fork 9
/
update.php
executable file
·33 lines (32 loc) · 1.96 KB
/
update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
rex_sql_table::get(rex::getTable('newsmanager'))
->ensureColumn(new rex_sql_column('pid', 'int(10) unsigned', false, null, 'auto_increment'))
->ensureColumn(new rex_sql_column('id', 'int(10) unsigned'))
->ensureColumn(new rex_sql_column('status', 'tinyint(1)', true, '0'))
->ensureColumn(new rex_sql_column('newsmanager_category_id', 'varchar(255)', true))
->ensureColumn(new rex_sql_column('title', 'varchar(255)', false, ''))
->ensureColumn(new rex_sql_column('subtitle', 'varchar(255)', false, ''))
->ensureColumn(new rex_sql_column('richtext', 'text', true))
->ensureColumn(new rex_sql_column('images', 'text', true))
->ensureColumn(new rex_sql_column('seo_title', 'varchar(255)', true))
->ensureColumn(new rex_sql_column('seo_description', 'varchar(255)', false, ''))
->ensureColumn(new rex_sql_column('seo_canonical', 'varchar(255)', true))
->ensureColumn(new rex_sql_column('clang_id', 'int(10)', true))
->ensureColumn(new rex_sql_column('author', 'varchar(255)'))
->ensureColumn(new rex_sql_column('createuser', 'varchar(255)'))
->ensureColumn(new rex_sql_column('createdate', 'datetime'))
->ensureColumn(new rex_sql_column('updateuser', 'varchar(255)'))
->ensureColumn(new rex_sql_column('updatedate', 'datetime'))
->setPrimaryKey('pid')
->ensure();
rex_sql_table::get(rex::getTable('newsmanager_categories'))
->ensureColumn(new rex_sql_column('pid', 'int(10) unsigned', false, null, 'auto_increment'))
->ensureColumn(new rex_sql_column('id', 'int(10) unsigned'))
->ensureColumn(new rex_sql_column('name', 'varchar(255)', true))
->ensureColumn(new rex_sql_column('clang_id', 'int(10)', true))
->ensureColumn(new rex_sql_column('createuser', 'varchar(255)'))
->ensureColumn(new rex_sql_column('createdate', 'datetime'))
->ensureColumn(new rex_sql_column('updateuser', 'varchar(255)'))
->ensureColumn(new rex_sql_column('updatedate', 'datetime'))
->setPrimaryKey('pid')
->ensure();