Dev Docs
  • Introduction
  • Becoming an ORCA Developer
  • Why Sign Up?
  • Developer Resources
  • Understanding Service Apps
  • How to Create a Service App for the ORCA Marketplace
  • Available Permissions
  • How to Request Permissions for a Service App
  • Happy Hours Admin
    • Happy Hours Admin
  • Cyress Tests
    • Cypress Test
  • Orca API
    • Education/Breakaway
    • TypeForm WebHook
    • getOrcaVideoList
    • getPremiumCourses
    • getCourseUsers
    • getDashBoardHeroStatistics
    • getUserProgress
    • Remove CE Credit
    • Add CE Credit
  • TypeForm
    • Setup a webHook on TypeForm
  • Database Migrations
    • MySQL Import Data using Laravel Seeds.
Powered by GitBook
On this page
  1. Database Migrations

MySQL Import Data using Laravel Seeds.

Import data from selected tables.

Setup the databases (From - To)

You must set the connection config for each database. There are some Env variables that we need to setup correctly.

#Origin database config info 

DB_MIGRATE_FROM_CONNECTION=mysql-migrate-from
DB_MIGRATE_FROM_HOST=FromHostNAme
DB_MIGRATE_FROM_PORT=3306
DB_MIGRATE_FROM_DATABASE=fromDatabaseName
DB_MIGRATE_FROM_USERNAME=fromUserName
DB_MIGRATE_FROM_PASSWORD=FromPassword

#Destination database config info

DB_MIGRATE_TO_CONNECTION=mysql-migrate-from
DB_MIGRATE_TO_HOST=toHostName
DB_MIGRATE_TO_PORT=3306
DB_MIGRATE_TO_DATABASE=toDatabaseName
DB_MIGRATE_TO_USERNAME=toUserName
DB_MIGRATE_TO_PASSWORD=toPassword

#list of table that will be copied. 
DB_MIGRATE_TABLES=mdl_quiz,mdl_quiz_grades

The list of table names must be separated by commas, no spaces are allowed.

How to run it.

php artisan db:seed --class=DataMigrationSeeder
PreviousSetup a webHook on TypeForm

Last updated 4 years ago