• Home
  • Raw
  • Download

Lines Matching refs:pivot_table

22 def delete_invalid_foriegn_keys(manager, pivot_table, foreign_key_field,  argument
29 dict(table=pivot_table, field=foreign_key_field,
34 (deleted_count, pivot_table, foreign_key_field))
47 def create_unique_index(manager, pivot_table, first_field, second_field): argument
48 index_name = unique_index_name(pivot_table)
50 (index_name, pivot_table, first_field, second_field))
54 old_index_name = basic_index_name(pivot_table, first_field)
56 (old_index_name, pivot_table))
59 def drop_unique_index(manager, pivot_table, first_field): argument
60 index_name = unique_index_name(pivot_table)
61 manager.execute('DROP INDEX %s ON %s' % (index_name, pivot_table))
63 old_index_name = basic_index_name(pivot_table, first_field)
65 (old_index_name, pivot_table, first_field))
84 def cleanup_m2m_pivot(manager, pivot_table, first_field, first_table, argument
86 delete_duplicates(manager, pivot_table, first_field, second_field)
87 delete_invalid_foriegn_keys(manager, pivot_table, first_field, first_table)
88 delete_invalid_foriegn_keys(manager, pivot_table, second_field,
94 create_unique_index(manager, pivot_table, second_field, first_field)
96 create_foreign_key_constraint(manager, pivot_table, first_field,
98 create_foreign_key_constraint(manager, pivot_table, second_field,
102 def reverse_cleanup_m2m_pivot(manager, pivot_table, first_field, second_field, argument
104 drop_foreign_key_constraint(manager, pivot_table, second_field)
105 drop_foreign_key_constraint(manager, pivot_table, first_field)
107 drop_unique_index(manager, pivot_table, second_field)