Replace “booklink” with your project name wherever it is found. Use the case structure in the example.
<?php class BooklinkInstaller extends AkInstaller { function up_1(){ $this->createTable('books', // The table name must be plural. 'id,'. // This key must be in every table. 'col_1 string(10),'. // Columns have default characteristics. 'col_last' // The last column does not end with a "." ); } function down_1(){ $this->dropTables('books'); } } ?>
simple not bad… The column type options are
Or any column type that is supported by the database you’re using, like varchar or smallint on MySQL. One warning though: don not use tinyint on MySQL because it will be typecasted as boolean.
See http://phplens.com/lens/adodb/docs-datadict.htm to customize column options.
./script/migrate Booklink install.svn status?”, enter svn add <path>svn commit -m 'create books table' . Any comment may follow -m.