Created
February 8, 2017 22:15
-
-
Save nsantorello/bf9a6e30ba0bc068c30ae820e4ca06cd to your computer and use it in GitHub Desktop.
Creating Seed Data with Mockeroo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from MyTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into MyTable (id, name) values (1, "some name"); | |
... etc... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DeleteTables.sql | |
MyTable.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MYSQL_USERNAME="your username here!" | |
MYSQL_DATABASE="your database here!" | |
cat ScriptOrder.txt | awk '{ print "source",$0 }' | mysql --batch --default-character-set=utf8mb4 --one-database -u $MYSQL_USERNAME -p $MYSQL_DATABASE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment