The state of California was admitted to the United States in 1850. That same year San Diego was designated the seat of the newly established San Diego County and was incorporated as a city. Joshua H. Bean, the last alcalde of San Diego, was elected the first mayor. Two years later the city was bankrupt; the California legislature revoked the city's charter and placed it under control of a board of trustees, where it remained until 1889. A city charter was re-established in 1889 and today's city charter was adopted in 1931.