Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CreateConstraint (0.13 sec)

  1. migrator/migrator.go

    							if err := execTx.Migrator().CreateConstraint(value, constraint.Name); err != nil {
    								return err
    							}
    						}
    					}
    				}
    
    				for _, chk := range parseCheckConstraints {
    					if !queryTx.Migrator().HasConstraint(value, chk.Name) {
    						if err := execTx.Migrator().CreateConstraint(value, chk.Name); err != nil {
    							return err
    						}
    					}
    				}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Apr 26 07:15:49 UTC 2024
    - 29K bytes
    - Viewed (0)
  2. migrator.go

    	ColumnTypes(dst interface{}) ([]ColumnType, error)
    
    	// Views
    	CreateView(name string, option ViewOption) error
    	DropView(name string) error
    
    	// Constraints
    	CreateConstraint(dst interface{}, name string) error
    	DropConstraint(dst interface{}, name string) error
    	HasConstraint(dst interface{}, name string) bool
    
    	// Indexes
    	CreateIndex(dst interface{}, name string) error
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    			DB.Migrator().CreateConstraint(&User{}, name)
    		}
    
    		if err := DB.Migrator().DropConstraint(&User{}, name); err != nil {
    			t.Fatalf("failed to drop constraint %v, got error %v", name, err)
    		}
    
    		if DB.Migrator().HasConstraint(&User{}, name) {
    			t.Fatalf("constraint %v should been deleted", name)
    		}
    
    		if err := DB.Migrator().CreateConstraint(&User{}, name); err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Mar 18 11:24:16 UTC 2024
    - 56.2K bytes
    - Viewed (0)
Back to top