
import uuid

from flask.ext.sqlalchemy import BaseQuery, SQLAlchemy
from sqlalchemy.dialects.postgresql import UUID


db = SQLAlchemy()


db.Uuid = UUID


def generate_uuid():
    """Generate a random UUID (Universally Unique IDentifier)."""
    return uuid.uuid4()


import uuid

from flask.ext.sqlalchemy import BaseQuery, SQLAlchemy
from sqlalchemy.dialects.postgresql import UUID


db = SQLAlchemy(session_options={'autoflush': False})


db.Uuid = UUID


def generate_uuid():
    """Generate a random UUID (Universally Unique IDentifier)."""
    return uuid.uuid4()

Disable autoflushing as introduced with Flask-SQLAlchemy 2.0.
Disable autoflushing as introduced with Flask-SQLAlchemy 2.0.

  
  import uuid
  
  from flask.ext.sqlalchemy import BaseQuery, SQLAlchemy
  from sqlalchemy.dialects.postgresql import UUID
  
  
- db = SQLAlchemy()
+ db = SQLAlchemy(session_options={'autoflush': False})
  
  
  db.Uuid = UUID
  
  
  def generate_uuid():
      """Generate a random UUID (Universally Unique IDentifier)."""
      return uuid.uuid4()
  
Disable autoflushing as introduced with Flask-SQLAlchemy 2.0.
## Code Before:

import uuid

from flask.ext.sqlalchemy import BaseQuery, SQLAlchemy
from sqlalchemy.dialects.postgresql import UUID


db = SQLAlchemy()


db.Uuid = UUID


def generate_uuid():
    """Generate a random UUID (Universally Unique IDentifier)."""
    return uuid.uuid4()

## Instruction:
Disable autoflushing as introduced with Flask-SQLAlchemy 2.0.
## Code After:

import uuid

from flask.ext.sqlalchemy import BaseQuery, SQLAlchemy
from sqlalchemy.dialects.postgresql import UUID


db = SQLAlchemy(session_options={'autoflush': False})


db.Uuid = UUID


def generate_uuid():
    """Generate a random UUID (Universally Unique IDentifier)."""
    return uuid.uuid4()
