var Sequelize = require('sequelize');
var db = new Sequelize(process.env.DATABASE_URL);

var User = db.import(__dirname + '/models/user.js');
var Campaign = db.import(__dirname + '/models/campaign.js');
var Project = db.import(__dirname + '/models/project.js');
var Payment = db.import(__dirname + '/models/payment.js');
var Goal = db.import(__dirname + '/models/goal.js');

Payment.hasOne(User);

User.hasMany(Payment);
Campaign.hasMany(Payment);
Project.hasMany(Payment);

Campaign.hasMany(Goal);
Project.hasMany(Goal);

module.exports = db;

@@ -131,24 +131,25 @@
 /user.js');%0A
+%0A
 var Campaign
@@ -252,24 +252,79 @@
 oject.js');%0A
+%0Avar Goal = db.import(__dirname + '/models/goal.js');%0A%0A
 var Payment 
@@ -374,81 +374,76 @@
 ');%0A
-var Goal = db.import(__dirname + '/models/goal.js');%0A%0APayment.hasOne(User
+%0APayment.hasOne(User);%0A%0ACampaign.hasMany(Goal);%0AProject.hasMany(Goal
 );%0A%0A
@@ -523,56 +523,8 @@
 );%0A%0A
-Campaign.hasMany(Goal);%0AProject.hasMany(Goal);%0A%0A
 modu

Clean up schema index slightly