Error at setup on Travis with django-pytest, docker

I got errors running pytest on Travis CI but have no idea how to fix it. When I run the command docker-compose run --rm api sh -c "pytest && flake8" on Docker in my local, all the tests pass. Could anyone give me a hint? I have some fixtures on as well.

A part of the error information

api/tests/ EEEEE                                      [ 45%]
api/tests/ EEEEEE                                          [100%]
==================================== ERRORS ====================================
__________ ERROR at setup of TestOrderItemModel.test_list_order_items __________
self = <django.db.backends.utils.CursorWrapper object at 0x7efe0e94d3d0>
sql = 'SELECT "orders_orderitem"."id", "orders_orderitem"."order_id", "orders_orderitem"."pizza_type", "orders_orderitem"."pizza_size", "orders_orderitem"."quantity" FROM "orders_orderitem" ORDER BY "orders_orderitem"."id" ASC'
params = ()
ignored_wrapper_args = (False, {'connection': <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7efe0fbb4fd0>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7efe0e94d3d0>})
    def _execute(self, sql, params, *ignored_wrapper_args):
        with self.db.wrap_database_errors:
            if params is None:
                return self.cursor.execute(sql)
>               return self.cursor.execute(sql, params)
E               psycopg2.errors.UndefinedColumn: column orders_orderitem.order_id does not exist
E               LINE 1: ...SOR WITH HOLD FOR SELECT "orders_orderitem"."id", "orders_or...


language: python
  - "3.7"

  - docker

before_script: pip install docker-compose

  - docker-compose run --rm api sh -c "pytest && flake8"


name = "pypi"
url = ""
verify_ssl = true

flake8 = "==3.7.9"
autopep8 = "==1.4.4"
pytest = "==5.2.1"
pytest-django = "==3.6.0"

django = "==2.2.7"
djangorestframework = "==3.10.3"
psycopg2 = "==2.8.4"

python_version = "3.7"

Source: StackOverflow