Skip to content

Commit

Permalink
removes next_value from sequence resource
Browse files Browse the repository at this point in the history
  • Loading branch information
jtzero committed Aug 26, 2021
1 parent 55b8409 commit 656f775
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions pkg/resources/sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ var sequenceSchema = map[string]*schema.Schema{
Required: true,
Description: "The schema in which to create the sequence. Don't use the | character.",
},
"next_value": {
Type: schema.TypeInt,
Description: "The next value the sequence will provide.",
Computed: true,
},
"fully_qualified_name": {
Type: schema.TypeString,
Description: "The fully qualified name of the sequence.",
Expand Down Expand Up @@ -196,11 +191,6 @@ func ReadSequence(d *schema.ResourceData, meta interface{}) error {
return err
}

err = d.Set("next_value", i)
if err != nil {
return err
}

err = d.Set("fully_qualified_name", seq.Address())
if err != nil {
return err
Expand Down Expand Up @@ -245,11 +235,6 @@ func UpdateSequence(d *schema.ResourceData, meta interface{}) error {
return err
}

err = d.Set("next_value", nextValue)
if err != nil {
return err
}

sq.WithStart(nextValue)

err = snowflake.Exec(db, sq.Create())
Expand Down
1 change: 0 additions & 1 deletion pkg/resources/sequence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func TestSequenceRead(t *testing.T) {
r.Equal("database", d.Get("database").(string))
r.Equal("mock comment", d.Get("comment").(string))
r.Equal(25, d.Get("increment").(int))
r.Equal(5, d.Get("next_value").(int))
r.Equal("database|schema|good_name", d.Id())
r.Equal(`"database"."schema"."good_name"`, d.Get("fully_qualified_name").(string))
})
Expand Down

0 comments on commit 656f775

Please sign in to comment.