percolatestudio / meteor-migrations

Simple migration system for Meteor
https://atmospherejs.com/percolate/migrations
MIT License
245 stars 58 forks source link

ReferenceError: Collection is not defined #15

Closed isAlmogK closed 10 years ago

isAlmogK commented 10 years ago

I'm getting a ReferenceError: Collection is not defined no idea what's casing the error

Migrations.add({
    version: 1,
    name: 'Adds email slug to topics in the db.',
    //code to migrate up to version 0.1
    up: function() {
        Topics.update({}, {$setOnInsert:{emailSlug:""}}, {multi:true});
    },
    //code to migrate down to version 0
    down: function() {
    }
});
isAlmogK commented 10 years ago

Fixed I had my migrations.js file in a folder inside the server folder /server/mirgrations/migrations.js

once I moved the file to just the ever everything worked.