How to change a node add form without changing the node edit form I'm using drupal 7

I'm writing a custom hook_form_alter something like this

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id){
    if($form_id == "rating_node_form")
        {
            // Do something
        }
}


it seems that both the node add form and the node edit form are using the same form ID. I'm wondering if there is a way to determine weather you are editing or adding a node and make changes to the form accordingly. Do they always have to be the same exact form?
node_object_prepare(), which is called from node_form() (the form builder for the node editing form), executes the following snippet to verify if a node is being added, or edited:

  // If this is a new node, fill in the default values.
  if (!isset($node-&gt;nid) || isset($node-&gt;is_new)) {
    foreach (array('status', 'promote', 'sticky') as $key) {
      // Multistep node forms might have filled in something already.
      if (!isset($node-&gt;$key)) {
        $node-&gt;$key = (int) in_array($key, $node_options);
      }
    }
    global $user;
    $node-&gt;uid = $user-&gt;uid;
    $node-&gt;created = REQUEST_TIME;
  }


In your case, you could use code similar to the following one:

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == "rating_node_form") {
    $node = $form_state['node'];
    if (!isset($node-&gt;nid) || isset($node-&gt;is_new)) {
      // The node is new.
    }
  }
}