Created
October 19, 2012 23:19
-
-
Save breandan/3921254 to your computer and use it in GitHub Desktop.
CreateSpendEstimates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateSpendEstimates < ActiveRecord::Migration | |
def up | |
execute <<-_SQL | |
CREATE TABLE `anbidder_spend_estimates` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
`destination_group_id` int(11), | |
`expires_at` TIMESTAMP NULL, | |
`amount` decimal(15,10) DEFAULT NULL, | |
`bidder_id` SMALLINT NOT NULL, | |
`description` varchar(255), | |
PRIMARY KEY (`id`), | |
CONSTRAINT `spend_est_dg_fk` FOREIGN KEY (`destination_group_id`) REFERENCES `destination_groups` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
_SQL | |
end | |
def down | |
drop_table :anbidder_spend_estimates | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment