From 64a1b5b29051868174105835fc0bb50ef500a57b Mon Sep 17 00:00:00 2001 From: Adrian Macneil Date: Sat, 28 Nov 2015 23:56:17 -0700 Subject: [PATCH] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b62087..7842e4a 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ To write a migration, simply add your SQL to the `migrate:up` section: ```sql -- migrate:up CREATE TABLE users ( - id INT PRIMARY KEY, + id INTEGER, name VARCHAR, email VARCHAR NOT NULL ); @@ -72,6 +72,8 @@ CREATE TABLE users ( -- migrate:down ``` +> Note: Migration files are named in the format `[version]_[description].sql`. Only the version (defined as all leading numeric characters in the file name) is recorded in the database, so you can safely rename a migration file without having any effect on its current application state. + ### Running Migrations Run `dbmate up` to run any pending migrations. @@ -82,7 +84,7 @@ Creating: myapp_development Applying: 20151127184807_create_users_table.sql ``` -Note: `dbmate up` will create the database if it does not already exist (assuming the current user has permission to create databases). If you want to run migrations without creating the database, run `dbmate migrate`. +> Note: `dbmate up` will create the database if it does not already exist (assuming the current user has permission to create databases). If you want to run migrations without creating the database, run `dbmate migrate`. ### Rolling Back Migrations