Skip to content

Commit 6da665a

Browse files
committed
Added some documentation
1 parent f2670a3 commit 6da665a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ $ go get github.com/danielmorell/sqlxm
2727
There are three basic functions that set up SQLX Migrator and start running your migrations.
2828

2929
1. `sqlxm.New()` creates a new `sqlxm.Migrator` instance that can be used to track and run migrations.
30-
2. `Migrator.AddMigration()` creates a new migration to run and keep track of.
30+
2. `Migrator.AddMigration()` creates a new migration to run and keep track of. Migrations are run in the order they
31+
are added.
3132
3. `Migrator.Run()` takes all the previous migrations added with `Migrator.AddMigration()` and makes sure they have been
3233
applied to database or applies them.
3334

@@ -130,6 +131,9 @@ TABLE` do the same thing but produce a different hash.
130131
In a scenario where you need to update the hash of the migration, you can use the `Migrator.RepairHash()` method to
131132
update the hash of previous migrations.
132133

134+
**Note:** safe mode will not prevent you from writing `DROP TABLE users` as a migration. It simply validates the
135+
integrity of the migration source with the already run migration.
136+
133137
### Backends
134138

135139
**Pre-built backends**

0 commit comments

Comments
 (0)