code: def upgrade():
      op.add_column(
          "metrics",
          sa.Column("is_restricted", sa.Boolean(), nullable=True),
      )
      op.add_column(
          "sql_metrics",
          sa.Column("is_restricted", sa.Boolean(), nullable=True),
      )
  
      bind = op.get_bind()
      session = db.Session(bind=bind)
  
      # don't use models.DruidMetric
      # because it assumes the context is consistent with the application
      for obj in session.query(DruidMetric).all():
          obj.is_restricted = False
  
      for obj in session.query(SqlMetric).all():
          obj.is_restricted = False
  
      session.commit()
      session.close()
  
file_path: superset/superset/migrations/versions/2016-06-07_12-33_d8bc074f7aad_add_new_field_is_restricted_to_.py
imports: import sqlalchemy
  from alembic import op
  from sqlalchemy import Boolean, Column, Integer
  from sqlalchemy.ext.declarative import declarative_base
  from superset import db
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types