Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
m130628_095343_apalines.php
1 <?php
2 
3 class m130628_095343_apalines extends CDbMigration
4 {
5  public function up()
6  {
7  $this->createTable('{{apalines_news}}', array(
8  'id' => 'pk',
9  'title' => 'string NOT NULL',
10  'ndate' => 'integer NOT NULL',
11  'channel' => 'string NOT NULL',
12  'docid' => 'string NOT NULL',
13  'background_news' => 'integer DEFAULT 0',
14  'related_maindoc_id' => 'string DEFAULT 0',
15  'place' => 'string',
16  'source' => 'string',
17  'teaser' => 'text',
18  'content' => 'text',
19  'filename' => 'string',
20  'author' => 'string',
21  'keywords' => 'text',
22  'created' => 'integer',
23  'updated' => 'integer',
24  'xml_filename' => 'string',
25  'apa_id' => 'string',
26  'deleted' => 'integer DEFAULT 0',
27  ));
28 
29  $this->createTable('{{apalines_mm}}', array(
30  'id' => 'pk',
31  'title' => 'string NOT NULL',
32  'ndate' => 'integer NOT NULL',
33  'channel' => 'string NOT NULL',
34  'docid' => 'string NOT NULL',
35  'related_maindoc_id' => 'string DEFAULT 0',
36  'place' => 'string',
37  'source' => 'string',
38  'filename' => 'string',
39  'author' => 'string',
40  'keywords' => 'text',
41  'created' => 'integer',
42  'updated' => 'integer',
43  'type' => 'integer DEFAULT 0',
44  'xml_filename' => 'string',
45  'apa_id' => 'string',
46  'deleted' => 'integer DEFAULT 0',
47  ));
48 
49  $this->createTable('{{apalines_file}}', array(
50  'id' => 'pk',
51  'href' => 'string NOT NULL',
52  'size' => 'integer',
53  'width' => 'integer',
54  'height' => 'integer',
55  'format' => 'string',
56  'parent_id' => 'integer',
57  ));
58  }
59 
60  public function down()
61  {
62  $this->dropTable('{{apalines_news}}');
63  $this->dropTable('{{apalines_mm}}');
64  $this->dropTable('{{apalines_file}}');
65  }
66 
67  /*
68  // Use safeUp/safeDown to do migration with transaction
69  public function safeUp()
70  {
71  }
72 
73  public function safeDown()
74  {
75  }
76  */
77 }