Documentation
¶
Overview ¶
migration package for migration
The table structure is as follow:
CREATE TABLE `migrations` (
`id_migration` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'surrogate key',
`name` varchar(255) DEFAULT NULL COMMENT 'migration name, unique',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'date migrated or rolled back',
`statements` longtext COMMENT 'SQL statements for this migration',
`rollback_statements` longtext,
`status` enum('update','rollback') DEFAULT NULL COMMENT 'update indicates it is a normal migration while rollback means this migration is rolled back',
PRIMARY KEY (`id_migration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Index ¶
Constants ¶
View Source
const ( M_DATE_FORMAT = "20060102_150405" M_DB_DATE_FORMAT = "2006-01-02 15:04:05" )
const the data format for the bee generate migration datatype
Variables ¶
This section is empty.
Functions ¶
Types ¶
Source Files
¶
- migration.go
Click to show internal directories.
Click to hide internal directories.