This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/db/migrate/20131118024736_create_advertisements.php

17 lines
660 B
PHP
Raw Normal View History

2013-11-18 05:33:10 +01:00
<?php
class CreateAdvertisements extends Rails\ActiveRecord\Migration\Base
{
public function up()
2013-11-18 05:33:10 +01:00
{
$this->createTable('advertisements', function($t) {
$t->column('image_url', 'string', ['null' => false]);
$t->column('referral_url', 'string', ['null' => false]);
$t->column('ad_type', 'string', ['null' => false]);
$t->column('status', 'string', ['null' => false]);
$t->column('hit_count', 'integer', ['null' => false, 'default' => 0]);
$t->column('width', 'integer', ['null' => false]);
$t->column('height', 'integer', ['null' => false]);
});
}
}