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 conftest.py as well.

A part of the error information

api/tests/test_order_items.py EEEEE                                      [ 45%]
api/tests/test_orders.py 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):
        self.db.validate_no_broken_transaction()
        with self.db.wrap_database_errors:
            if params is None:
                return self.cursor.execute(sql)
            else:
>               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...

.travis.yml

language: python
python:
  - "3.7"

services:
  - docker

before_script: pip install docker-compose

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

Pipfile

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
flake8 = "==3.7.9"
autopep8 = "==1.4.4"
pytest = "==5.2.1"
pytest-django = "==3.6.0"

[packages]
django = "==2.2.7"
djangorestframework = "==3.10.3"
psycopg2 = "==2.8.4"

[requires]
python_version = "3.7"

Source: StackOverflow