message: fix(dataset): handle missing database in migration
diff: @@ -321,8 +321,10 @@ def after_insert(target: SqlaTable) -> None: # pylint: disable=too-many-locals
  # table names
  database = (
  target.database
  - or session.query(Database).filter_by(id=target.database_id).one()
  + or session.query(Database).filter_by(id=target.database_id).first()
  )
  + if not database:
  + return
  engine = database.get_sqla_engine(schema=target.schema)
  conditional_quote = engine.dialect.identifier_preparer.quote
  