Giter Site home page Giter Site logo

Comments (7)

shone83 avatar shone83 commented on May 18, 2024 1

In migrations in 2018_10_08_002853_add_department_class_teacher_to_users_table.php file instead of this:

        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn(['department']);
        });

do this:

        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn(['department_id']);
        });

from unifiedtransform.

rowild avatar rowild commented on May 18, 2024

In case anybody else wants to use fake data for testing, activating all databse seeds won't work at the moment because of either student_id or teacher_id must not be NULL. This is the setup that helped me to get as much data as possible without any errors:

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $this->call(SchoolsTableSeeder::class);
        $this->call(ClassesTableSeeder::class);
        $this->call(SectionsTableSeeder::class);
        $this->call(UsersTableSeeder::class);
        // $this->call(AttendancesTableSeeder::class);
        $this->call(SyllabusesTableSeeder::class);
        $this->call(NoticesTableSeeder::class);
        $this->call(EventsTableSeeder::class);
        $this->call(FeesTableSeeder::class);
        // $this->call(HomeworksTableSeeder::class);
        $this->call(RoutinesTableSeeder::class);
        // $this->call(NotificationsTableSeeder::class);
        $this->call(ExamsTableSeeder::class);
        $this->call(GradesystemsTableSeeder::class);
        // $this->call(CoursesTableSeeder::class);
        // $this->call(GradesTableSeeder::class);
        // $this->call(FeedbacksTableSeeder::class);
        $this->call(FormsTableSeeder::class);
        $this->call(BooksTableSeeder::class);
        $this->call(MessagesTableSeeder::class);
        $this->call(FaqsTableSeeder::class);
        $this->call(IssuedbooksTableSeeder::class);
        $this->call(AccountsTableSeeder::class);
        $this->call(AccountSectorsTableSeeder::class);
        // $this->call(StudentinfosTableSeeder::class);
        // $this->call(StudentboardexamsTableSeeder::class);
    }
}

from unifiedtransform.

changeweb avatar changeweb commented on May 18, 2024

@rowild I applied @shone83 's fix using a new pull request

from unifiedtransform.

rowild avatar rowild commented on May 18, 2024

Applied the fix manually, but when running the migrate:refresh 2x in a row, I get this error:

In Grammar.php line 36:
                              
  Array to string conversion 

I can't find any Grammar.php file...

from unifiedtransform.

rowild avatar rowild commented on May 18, 2024

This fix does not work. Please test with all seeds and run migrate:refresh at least twice and you'll see that there are still troubles.

from unifiedtransform.

changeweb avatar changeweb commented on May 18, 2024

@rowild I forgot to uncomment a factory line from user seeder class after a certain test case. Now all my Seedings are working. Please take a look. Now I've updated the it via pull request.

mig-fix

from unifiedtransform.

rowild avatar rowild commented on May 18, 2024

This issue is solved, so I close it. Thank you, @changeweg.

from unifiedtransform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.