old_contents: from flask.ext.sqlalchemy import SQLAlchemy
  
  def register( app ):
      db = SQLAlchemy()
      db.app = app
      from peanuts.models import *
      db.create_all()
  
new_contents: from flask.ext.sqlalchemy import SQLAlchemy
  
  def register( app ):
      db = SQLAlchemy(app)
      db.app = app
      from peanuts.models import *
      db.create_all()
  
subject: Update database.py