Skip to content
This repository has been archived by the owner. It is now read-only.

Fix `truffle create migration`. #13

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
2 participants
@abuiles
Copy link

commented Jul 4, 2017

After creating a migration the file ends up in the wrong location.

$ truffle create migration HelloWorld
$ git st
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	migrations/1499201171_hello_world.js/migration.js

Which is ignore by the migrate command:

$ truffle migrate --reset
Compiling ./contracts/HelloWorld.sol...
Compiling ./contracts/Migrations.sol...
Writing artifacts to ./build/contracts

Using network 'development'.

Running migration: 1_initial_migration.js
  Deploying Migrations...
  Migrations: 0xaec3202cde63767fe4b970d5d26464d84e0bda11
Saving successful migration to network...
Saving artifacts...

This PR fixes the core test to make it more strict and fix the offending
code.

The following is the result using this branch:

$ truffle create migration HelloWorld
$ git st
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	migrations/1499201626_hello_world.js

$ truffle migrate --reset
Using network 'development'.

Running migration: 1_initial_migration.js
  Replacing Migrations...
  Migrations: 0x526399b80b798f0baa9b88a4936402f65adb86f4
Saving successful migration to network...
Saving artifacts...
Running migration: 1499201626_hello_world.js
  Deploying HelloWorld...
  HelloWorld: 0x1ca72d93fc7b0605deed12986f8b405ff1ce1a9c
Saving successful migration to network...
Saving artifacts...
@tcoulter

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2017

Story points: 2

@tcoulter tcoulter self-assigned this Jul 18, 2017

@tcoulter

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2017

See #20.

@abuiles abuiles closed this Jul 19, 2017

@abuiles abuiles deleted the abuiles:fix-create-migration branch Jul 19, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.