Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Look (0.11 sec)

  1. migrator/migrator.go

    		// avoid using the same name field
    		if stmt.Schema == nil {
    			return errors.New("failed to get schema")
    		}
    		f := stmt.Schema.LookUpField(name)
    		if f == nil {
    			return fmt.Errorf("failed to look up field with name: %s", name)
    		}
    
    		if !f.IgnoreMigration {
    			return m.DB.Exec(
    				"ALTER TABLE ? ADD ? ?",
    				m.CurrentTable(stmt), clause.Column{Name: f.DBName}, m.DB.Migrator().FullDataTypeOf(f),
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  2. schema/relationship_test.go

    }
    
    type Author struct {
    	gorm.Model
    }
    
    type Book struct {
    	gorm.Model
    	Author   Author
    	AuthorID uint
    }
    
    func (Book) TableName() string {
    	return "my_schema.a_very_very_very_very_very_very_very_very_long_table_name"
    }
    
    func TestParseConstraintNameWithSchemaQualifiedLongTableName(t *testing.T) {
    	s, err := schema.Parse(
    		&Book{},
    		&sync.Map{},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
Back to top