| 1 | sed -i "s/belongs_to(['\"]\(\w\+\)['\"], through=\([^,]\+\), via=/\1 = AssociationProxy(\2, /" $1 |
|---|
| 2 | sed -i "s/belongs_to(['\"]\(\w\+\)['\"], of_kind=/\1 = ManyToOne(/" $1 |
|---|
| 3 | sed -i "s/has_many(['\"]\(\w\+\)['\"], through=\([^,]\+\), via=/\1 = AssociationProxy(\2, /" $1 |
|---|
| 4 | sed -i "s/has_many(['\"]\(\w\+\)['\"], of_kind=/\1 = OneToMany(/" $1 |
|---|
| 5 | sed -i "s/has_one(['\"]\(\w\+\)['\"], through=\([^,]\+\), via=/\1 = AssociationProxy(\2, /" $1 |
|---|
| 6 | sed -i "s/has_one(['\"]\(\w\+\)['\"], of_kind=/\1 = OneToOne(/" $1 |
|---|
| 7 | sed -i "s/has_and_belongs_to_many(['\"]\(\w\+\)['\"], through=\([^,]\+\), via=/\1 = AssociationProxy(\2, /" $1 |
|---|
| 8 | sed -i "s/has_and_belongs_to_many(['\"]\(\w\+\)['\"], of_kind=/\1 = ManyToMany(/" $1 |
|---|
| 9 | sed -i "s/has_field(['\"]\(\w\+\)['\"], through=\(['\"a-zA-Z0-9_]\+\), attribute=\(['\"a-zA-Z0-9_]\+\)/\1 = AssociationProxy(\2, \3/" $1 |
|---|
| 10 | sed -i "s/has_field(\(['\"]\)\(\w\+\)['\"], through=\(['\"a-zA-Z0-9_]\+\)/\1 = AssociationProxy(\3, \1\2\1/" $1 |
|---|
| 11 | sed -i "s/has_field(['\"]\(\w\+\)['\"], /\1 = Field(/" $1 |
|---|
| 12 | |
|---|