docstr: Create a database
docstr_tok: ["Create","a","database"]
code: def post(self):
      """Create a database"""
      if "database" not in request.json:
          abort(
              HTTPStatus.BAD_REQUEST,
              'Must provide "database" parameter in POST body',
          )
      session = SessionController()
      database = request.json["database"]
      parameters = {}
      if "name" not in database:
          abort(
              HTTPStatus.BAD_REQUEST,
              'Missing "name" field for database',
          )
      if "engine" not in database:
          abort(
              HTTPStatus.BAD_REQUEST,
              'Missing "engine" field for database. If you want to create a project instead, use the /api/projects endpoint.',
          )
      if "parameters" in database:
          parameters = database["parameters"]
      name = database["name"]
  
      if session.database_controller.exists(name):
          abort(
              HTTPStatus.CONFLICT,
              f"Database with name {name} already exists.",
          )
      new_integration_id = session.integration_controller.add(
          name, database["engine"], parameters
      )
      new_integration = session.database_controller.get_integration(
          new_integration_id
      )
      return new_integration, HTTPStatus.CREATED
  
imports: from http import HTTPStatus
  from sqlalchemy.exc import NoResultFound
  from typing import Dict
  from flask import request
  from flask_restx import Resource, abort
  from mindsdb.api.http.namespaces.configs.databases import ns_conf
  from mindsdb.api.mysql.mysql_proxy.classes.fake_mysql_proxy import FakeMysqlProxy
  from mindsdb.api.executor.controllers.session_controller import SessionController
  from mindsdb.api.executor.datahub.classes.tables_row import TablesRow
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from mindsdb_sql import parse_sql, ParsingException
  from mindsdb_sql.parser.ast import CreateTable, DropTables
label_desc: Use image node_id 2 for calling the DatabasesResource obj's underlying member method code with example usage: obj.post() and returns: new_integration,  HTTPStatus