3/21/2023 0 Comments Mysql data generatorColumn.generator: bit | boolean | date | foreignKey | integer | real | time | string | values | function | faker // data type generator used for this column.lumns: Column // list of columns handled by the tool.The number of lines resulting in the table will not exceed Table.maxLines Table.addLines: number // Number of rows to be inserted on a single run. Table.maxLines: number // Maximum number of rows this table should contains.Table.lines: number // Deprecated in favor of maxLines.tables: Table // list of tables handled by the tool.values: : any // an object of user defined array of values.You can set this parameter or ignoredTables depending on the number of table to work with tablesToFill: string // list of table name that should be analysed and filled.seed: number // The seed used by the random generator.This will override your custom column max value if it's bigger than maxLengthValue. maxLengthValue: number? // Hard limit of the maximum number of characters in string column type.options: Array // an array of column options to configure specific generators for the whole file generator is an array of string to allow multiple settings at once.ignoredTables: string // list of table name that should not be analysed nor filled.engine: "MariaDB" // only MariaDB is supported for the time being but it should also be compatible with MySQL.disableTriggers: boolean // disable triggers per table during process and recreate them afterward.columns in table are ordered accordingly to your custom schema so you can rely on other column value in the same row.insert rows until it reaches the defined table limit.get the values of foreign keys if needed.Those scripts can contains DELIMITER caommands as they will be run directly by MySQL client executable.Īs they will be run every time the generation is launched you have to take care of the cleanup.įor every tables listed in settings/schema.jsonc, the tool will: sql scripts are provided within the settings/scripts folder, they will be played before generation. At any time you can Export the Database by clicking 'Export Schema' button.Mysqldatagen -db any. Once you create at least one table, then you can generate and fill it with testing data 'Enter' key will trigger 'Save Table' action Use 'Tab' and 'Shift+Tab' to move on next or previous field I hope you will enjoy it, please contact me if you experience any issue or if you have ideas how we can make it better! Please note that Foreign keys and unique constraint for multiple columns is not supported yet. In current version it is possible only to create database tables. There are other rules and they can be extended easily. The application is build in such way so creating database tables is intendet to be easy, fast and cool.Īs php developer with more than 10 years experience, I have built a lot of databases for different projects.Įntering data for tables is pretty boring with the existing applications like Phpmyadmin or Mysql Workbench, so I decided to create a tool that will do the job faster.īased on the field names provided, application will try to guess the corresponding data type and other column settings.Įxamples: for all fields ending in '_at' like 'created_at' system will assign TIMESTAMP type with CURRENT_TIMESTAMP default value,įields starting with 'is_' like 'is_featured' system will assign 'BIT(1)' UNSIGNED, price: DECIMAL(10,2), username: VARCHAR(100) with UNIQUE key and so on. This is a free online tool that allows to create MySql Database Schema.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |