The establishment clause of the first amendment only applied to the federal government.First Amendment: An Overview
The First Amendment of the United States Constitution protects the right to freedom of religion and freedom of expression from government interference. It prohibits any laws that establish a national religion, impede the free exercise of religion, abridge the freedom of speech, infringe upon the freedom of the press, interfere with the right to peaceably assemble, or prohibit citizens from petitioning for a governmental redress of grievances. It was adopted into the Bill of Rights in 1791. The Supreme Court interprets the extent of the protection afforded to these rights. The First Amendment has been interpreted by the Court as applying to the entire federal government even though it is only expressly applicable to Congress. Furthermore, the Court has interpreted the Due Process Clause of the Fourteenth Amendment as protecting the rights in the First Amendment from interference by state governments.
Freedom of Religion
Two clauses in the First Amendment guarantee freedom of religion. The Establishment Clause prohibits the government from passing legislation to establish an official religion or preferring one religion over another. It enforces the "separation of church and state." However, some governmental activity related to religion has been declared constitutional by the Supreme Court. For example, providing bus transportation for parochial school students and the enforcement of "blue laws" is not prohibited. The Free Exercise Clause prohibits the government, in most instances, from interfering with a person's practice of their religion.
First Amendment
Madison tried to get the establishment clause to apply to the states but was defeated in the Senate.
Look it up.