Skip to content

Commit

Permalink
adds ForceNew on sequence db, schema & name
Browse files Browse the repository at this point in the history
  • Loading branch information
jtzero committed Aug 31, 2021
1 parent 656f775 commit bb62bdb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/resources/sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var sequenceSchema = map[string]*schema.Schema{
Type: schema.TypeString,
Required: true,
Description: "Specifies the name for the sequence.",
ForceNew: true,
},
"comment": {
Type: schema.TypeString,
Expand All @@ -40,11 +41,13 @@ var sequenceSchema = map[string]*schema.Schema{
Type: schema.TypeString,
Required: true,
Description: "The database in which to create the sequence. Don't use the | character.",
ForceNew: true,
},
"schema": {
Type: schema.TypeString,
Required: true,
Description: "The schema in which to create the sequence. Don't use the | character.",
ForceNew: true,
},
"fully_qualified_name": {
Type: schema.TypeString,
Expand Down Expand Up @@ -196,12 +199,7 @@ func ReadSequence(d *schema.ResourceData, meta interface{}) error {
return err
}

d.SetId(fmt.Sprintf(`%v|%v|%v`, sequence.DBName.String, sequence.SchemaName.String, sequence.Name.String))
if err != nil {
return err
}

return err
return nil
}

func UpdateSequence(d *schema.ResourceData, meta interface{}) error {
Expand Down

0 comments on commit bb62bdb

Please sign in to comment.