1

Actually, I can't import Masonite's models properly inside my migration file. I want to create pre-registered data as database seeds. How can I do that?

Junior Gantin
  • 2,102
  • 1
  • 18
  • 24

1 Answers1

1

Make a __init__.py file in your migrations directory and put this in it:

import os
import sys
sys.path.append(os.getcwd())
Vaibhav Mule
  • 5,016
  • 4
  • 35
  • 52
Junior Gantin
  • 2,102
  • 1
  • 18
  • 24