About This Author

16 Comments

You can post comments in this post.


  • Just knew about this tool from SO .. really helpfull 😀

    Thanks a lot

    Ferri Sutanto 4 years ago Reply


    • Glad to hear that it helped! 🙂

      I know there are still some issues, i will improve it as soon i have time.

      Simon Funk 4 years ago Reply


  • It would be great if it could also generate plain migrations, sometimes refactoring legacy php+mysql apps is a PITA

    Andrea Bergamasco 3 years ago Reply


    • Good hint, i will try to add it soon, thanks.

      Simon Funk 3 years ago Reply


  • I drop a simple mysql dump into the sql of your page:

    CREATE TABLE IF NOT EXISTS `nerds` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `nerd_level` int(11) NOT NULL,
    `created_at` timestamp NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    `updated_at` timestamp NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ;


    — Dumping data for table `nerds`

    INSERT INTO `nerds` (`id`, `name`, `email`, `nerd_level`, `created_at`, `updated_at`) VALUES
    (2, ‘stu pidaso’, ‘qrs881@glovoa.com’, 3, ‘2014-07-25 03:20:18’, ‘2014-07-29 03:05:35’),
    (3, ‘jon doe’, ‘jon@doe.com’, 1, ‘2014-07-25 03:20:50’, ‘2014-07-25 03:20:50’),
    (4, ‘bub’, ‘bub@glovoa.org’, 1, ‘2014-07-25 06:13:35’, ‘2014-07-25 09:32:53’),
    (5, ‘joanne’, ‘chulasb@glovoa.org’, 1, ‘2014-07-25 06:16:03’, ‘2014-07-25 06:16:03’);

    it goes into infinite converting mode. What do i need to do?

    stu pida 3 years ago Reply


    • We moved the server, due that it didn’t worked right. I’ve fixed it.

      Simon Funk 3 years ago Reply


  • don’t work
    http://screencast.com/t/pNlQzjoC

    Vladimir 3 years ago Reply


  • I tried my table but it didn’t work.
    It went into infinite loop.
    here is my data:

    INSERT INTO `users` (`id`, `name`, `email`, `sex`, `slug`, `avatar`, `created_at`, `updated_at`, `password`, `remember_token`) VALUES
    (1, ‘Omar.Qusai’, ‘Omar.Qusai@me.me’, 1, ‘omarqusai’, ‘public/defaults/avatars/male.jpg’, ‘2017-04-11 08:34:07’, ‘2017-04-11 08:34:07’, ‘$2y$10$8XIg2SUULIVGX2HtRo0r3eMUr6UxLb0dUT7S.8Qf5HE2zlE7g2mPy’, NULL),
    (2, ‘Muhammad Omar Abdu Allaah’, ‘MuhammadOmarAbduAllaah@me.me’, 1, ‘muhammad-omar-abdu-allaah’, ‘public/avatars/A5dKKNk8CT98jLtPwWc87Gqdqkr1aGvCiRGRbpxI.jpeg’, ‘2017-04-22 01:56:13’, ‘2017-04-22 02:02:46’, ‘$2y$10$UxgafPcKZZxb77BL7c6M..Y2FrMN/4QpgLkBu5tfR6Tw2.DgTrSz6’, ‘9XXnVpWBTszwerk81XzOomnsuGnYBgaODZLblWOABOZ5sr2jACk0zJUvJrBw’),
    (3, ‘LarryFeefs’, ‘0dayscene@mail.ru’, 1, ‘larryfeefs’, ‘public/defaults/avatars/male.jpg’, ‘2017-04-22 06:22:47’, ‘2017-04-22 06:22:47’, ‘$2y$10$z/1tBYlARtbKlcskUZrlFumlAuxVHpUm6rNwn2dyEa.Dgq6D.nebC’, NULL),
    (4, ‘فاطمة الزهراء نور الإسلام’, ‘fana1@me.me’, 0, ‘fatm-alzhra-nor-aleslam’, ‘public/defaults/avatars/female.jpg’, ‘2017-04-23 06:53:29’, ‘2017-04-23 06:53:29’, ‘$2y$10$W3BChMGlsjuALnwhYZVFj.K0SR/6ooUg3EnDqf7bFMwWt/iAhpn66’, ‘ml1r43nWuqfU9jx5Et1aEEyVWNhI81g3tX8HZTj7kt9qH4IljeGFJ42DIQMF’),
    (5, ‘Muhammad Omar Abdu ArRahman’, ‘MOAA@me.me’, 1, ‘muhammad-omar-abdu-arrahman’, ‘public/defaults/avatars/male.jpg’, ‘2017-04-24 17:49:23’, ‘2017-04-24 17:49:23’, ‘$2y$10$XzfDC2gZZmTM9evnJCh7gOKu0dzW0KQHKYABugX61Jm/bQrZVh4L2’, NULL),
    (6, ‘Person 1’, ‘person1@me.me’, 0, ‘person-1’, ‘public/defaults/avatars/female.jpg’, ‘2017-04-25 23:50:02’, ‘2017-04-25 23:50:02’, ‘$2y$10$XKJsm5BSOdbyXCJjUNzes.IeVolqyQV83ZPDqQOsMpNvWRV9vZJ5m’, NULL),
    (7, ‘Person 2’, ‘person2@me.me’, 1, ‘person-2’, ‘public/defaults/avatars/male.jpg’, ‘2017-04-25 23:50:36’, ‘2017-04-25 23:50:36’, ‘$2y$10$SWksz8M3.a.764hJGeZ3POOjxeO52Lp8CkujEReeM/iJ3b.DUZXgW’, NULL),
    (8, ‘basel’, ‘beso.qb94@gmail.com’, 1, ‘basel’, ‘public/defaults/avatars/male.jpg’, ‘2017-04-30 04:05:46’, ‘2017-04-30 04:05:46’, ‘$2y$10$1vSa3ze2QkILgBN8XFr3..a2kNBadT7r2f9Y6ZrvTRyjlYFqZMVju’, NULL);

    Qussayyon Qamaron 2 years ago Reply


    • fixed, it works now

      Simon Funk 2 years ago Reply


  • The First Letters proceeding underscores still depict a CamelCase in model names. I think it should be considered in the conversion of table name to ModelName.

    besides that, this is *Awesome*!

    James 2 years ago Reply


  • Please add export button, to download it as text file.

    Madvin 1 year ago Reply


  • hello my friend! this is really helpful but can you help me? im trying to convert more than 1000 rows using this(sql-to-laravel-seeder) but it has errors

    http://laravel.stonelab.ch/sql-seeder-converter/converter.php 500 (Internal Server Error)

    thank you

    nivra 1 year ago Reply


    • Hi, could you send me the insert command?

      Simon Funk 1 year ago Reply


      • good day my friend here is the insert command. thank you my friend

        https://pastebin.com/2utQ69eP

        Nivra 1 year ago Reply


        • I just edited your post to keep it cleaner 😉

          It worked for me, probably a temporary issue. Here is the result:
          https://pastebin.com/xN0fU5Hs

          Simon Funk 1 year ago Reply


          • thanks my friend i tested it and it worked, may i know the issue? what if i have another insert command with 1000+ rows will it work for me now using your website? thank you. 😀

            Nivra 1 year ago


Post A Reply

*