Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dolt: Schema diff no worky for changing primary keys #1628

Closed
timsehn opened this issue May 3, 2019 · 0 comments
Closed

Dolt: Schema diff no worky for changing primary keys #1628

timsehn opened this issue May 3, 2019 · 0 comments

Comments

@timsehn
Copy link
Sponsor Contributor

timsehn commented May 3, 2019

timsehn:videogame-sales timsehn$ dolt diff
diff --dolt a/videogame_sales b/videogame_sales
--- a/videogame_sales @ q1s2plh3ans4d9drcei5gi4futgmovhu
+++ b/videogame_sales @ gl5087ols1lji8csbom2hfj3fall5ich
  CREATE TABLE videogame_sales (
<   Rank int comment 'tag:0'
>   Rank int comment 'tag:0'
<   Name varchar comment 'tag:1'
>   Name varchar comment 'tag:1'
<   Platform varchar comment 'tag:2'
>   Platform varchar comment 'tag:2'
    Year int comment 'tag:3'
    Genre varchar comment 'tag:4'
    Publisher varchar comment 'tag:5'
    NA_Sales float comment 'tag:6'
    EU_Sales float comment 'tag:7'
    JP_Sales float comment 'tag:8'
    Other_Sales float comment 'tag:9'
    Global_Sales float comment 'tag:10'
  );

Failed to merge schemas
timsehn:videogame-sales timsehn$ dolt schema
videogame_sales @ working
CREATE TABLE videogame_sales (
  Rank int comment 'tag:0',
  Name varchar comment 'tag:1',
  Platform varchar comment 'tag:2',
  Year int comment 'tag:3',
  Genre varchar comment 'tag:4',
  Publisher varchar comment 'tag:5',
  NA_Sales float comment 'tag:6',
  EU_Sales float comment 'tag:7',
  JP_Sales float comment 'tag:8',
  Other_Sales float comment 'tag:9',
  Global_Sales float comment 'tag:10',
  primary key (Name,Platform)
);

timsehn:videogame-sales timsehn$ dolt schema HEAD^
videogame_sales @ HEAD^
CREATE TABLE videogame_sales (
  Rank varchar comment 'tag:0',
  Name varchar comment 'tag:1',
  Platform varchar comment 'tag:2',
  Year varchar comment 'tag:3',
  Genre varchar comment 'tag:4',
  Publisher varchar comment 'tag:5',
  NA_Sales varchar comment 'tag:6',
  EU_Sales varchar comment 'tag:7',
  JP_Sales varchar comment 'tag:8',
  Other_Sales varchar comment 'tag:9',
  Global_Sales varchar comment 'tag:10',
  primary key (Rank)
);

I'll create a failing bats test for this.

@tbantle22 tbantle22 transferred this issue from another repository Apr 29, 2021
@tbantle22 tbantle22 transferred this issue from dolthub/taylortemp Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants