You should do like this:
rails g migration AddStatesToOrder payment_state_id:integer delivery_state_id:integer
And define the relation like this in the model:
belongs_to :payment_state, class_name: State.model_name
belongs_to :delivery_state, class_name: State.model_name
Why using :integer instead of :references? Because the thing you want to do is not "conventional", it is a customized double-relation to the same model, and Rails cannot guess it for you.