Using Git to track mysql schema - some questions

后端 未结 8 2031
忘掉有多难
忘掉有多难 2020-12-04 10:27

If this is recommended ?

Can I ask some git command examples about how to track versions of mysql schema?

Should we use another repository other then the on

8条回答
  •  离开以前
    2020-12-04 10:46

    If you're just tracking the schema, put all of the CREATE statements into one .sql file, and add the file to git.

    $> mkdir myschema && cd myschema
    $> git init
    $> echo "CREATE TABLE ..." > schema.sql
    $> git add schema.sql
    $> git commit -m "Initial import"
    

提交回复
热议问题