سلام وقت بخیر من وقتی که دستور python manage.py migrate
را وارد میکنم ارور زیر رو دریافت میکنم
Operations to perform:
Apply all migrations: admin, auth, catalogue, contenttypes, sessions
Running migrations:
Traceback (most recent call last):
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 82, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.InsufficientPrivilege: permission denied for schema public
LINE 1: CREATE TABLE "django_migrations" ("id" bigserial NOT NULL PR...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\migrations\recorder.py", line 68, in ensure_schema
editor.create_model(self.Migration)
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\base\schema.py", line 331, in create_model
self.execute(sql, params or None)
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\base\schema.py", line 145, in execute
cursor.execute(sql, params)
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 98, in execute
return super().execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 79, in _execute
with self.db.wrap_database_errors:
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 82, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.ProgrammingError: permission denied for schema public
LINE 1: CREATE TABLE "django_migrations" ("id" bigserial NOT NULL PR...
^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Pascalsystem\academy\manage.py", line 22, in <module>
main()
File "C:\Users\Pascalsystem\academy\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
utility.execute()
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py", line 398, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\management\commands\migrate.py", line 244, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\migrations\executor.py", line 91, in migrate
self.recorder.ensure_schema()
File "C:\Users\Pascalsystem\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\migrations\recorder.py", line 70, in ensure_schema
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (permission denied for schema public
LINE 1: CREATE TABLE "django_migrations" ("id" bigserial NOT NULL PR...
^
)
لطفا میشه راهنماییم کنید