Note, a Dolt commit is different than a standard SQL transaction COMMIT. Your schema is created and you have a Dolt commit tracking the creation, as seen in the dolt_log system table. | vluuhvd0bn59598utedt77ed9q5okbcb | Tim Sehn | | 16:33:59.531 | Initialize data repository | | ne182jemgrlm8jnjmoubfqsstlfi1s98 | Tim Sehn | | 16:35:49.277 | Created initial schema | | commit_hash | committer | email | date | message | Mysql> call dolt_commit('-m', 'Created initial schema') Mysql> call dolt_add('teams', 'employees', 'employees_teams') So, we add and commit our new schema like so. If you know Git, the version control procedures and system tables should feel familiar. For named arguments like sending a message into the dolt_commit command use two arguments in sequence like ('-m', 'This is a message'). For instance, to specify tables to add, send the table names in as options to the dolt_add procedure. Passing options also follows the command line model. So dolt add on the CLI becomes dolt_add as a stored procedure. The naming of the system tables and stored procedures follows the dolt_ pattern. In SQL, Dolt exposes version control read operations as system tables and version control write operations as stored procedures. On the command line, Dolt commands map exactly to their Git equivalent with the targets being tables instead of files. Make a Dolt commit whenever you want to restore or compare to this point in time.ĭolt exposes version control functionality through a Git-style interface. A Dolt commit allows you to time travel and see lineage. It's time to use your first Dolt feature. It's a modern, feature-rich SQL database. Version - Displays the current Dolt cli version.ĭump - Export all tables in the working set into a file.įoreign key (team_id) references teams(id),įoreign key (employee_id) references employees(id)) ĭolt supports foreign keys, secondary indexes, triggers, check constraints, and stored procedures. Merge-base - Find the common ancestor of two commits. Gc - Cleans up unreferenced data from the repository.įilter-branch - Edits the commit history using the provided query. Read-tables - Fetch table(s) at a specific commit into a new dolt repo Migrate - Executes a database migration to use the latest Dolt data format. Table - Commands for copying, renaming, deleting, and exporting tables.īlame - Show what revision and author last modified each row of a table.Ĭonstraints - Commands for handling constraints. Schema - Commands for showing and importing table schemas. Remote - Manage set of tracked repositories.Ĭreds - Commands for managing credentials. Pull - Fetch from a dolt remote data repository and merge. Revert - Undo the changes introduced in a commit.Ĭlone - Clone from a remote data repository.įetch - Update the database from a remote data repository. Sql-client - Starts a built-in MySQL client.īranch - Create, list, edit, delete branches.Ĭheckout - Checkout a branch or overwrite a table from HEAD.Ĭonflicts - Commands for viewing and resolving merge conflicts.Ĭherry-pick - Apply the changes introduced by an existing commit. Sql-server - Start a MySQL-compatible server. Sql - Run a SQL query against tables in repository. Reset - Remove table changes from the list of staged table changes.Ĭlean - Remove untracked tables from working set.Ĭommit - Record changes to the repository. Init - Create an empty Dolt data repository.Īdd - Add table changes to the list of staged table changes. The dolt CLI has the same commands as git, with some extras. Of Dolt and keep an existing MySQL or MariaDB database. This is a great way to get the version control benefits But if you want some ideas, here's how people are usingĭolt can be set up as a replica of your existing MySQL or MariaDBĭatabase using standard MySQL binlog replication. Lots of things! Dolt is a generally useful tool with countlessĪpplications. If you want us to run a Dolt server for you, we have Hosted Dolt. Your own version of DoltHub, we have DoltLab. It's like Git and MySQL had aĭolt databases. Your changes, push them to a remote, or merge your teammate's changes.Īll the commands you know for Git work exactly the same for Dolt. Use the command line interface to import CSV files, commit MySQL database to run queries or update the data using SQLĬommands. Dolt is a SQL database that you can fork, clone, branch, merge, pushĪnd pull just like a Git repository.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |