Generally jurisdiction is done by state. You technically can file for child custody anywhere within the six months you're in the state if there is no open case already but you can't file for divorce unless you're in the county as least 3 months.
You should be fine now to file if you've lived in the state for 6 months and in the county for three months.
This is not a comprehensive answer and it is impossible to provide a meaningful response without a consultation. Call us for more information. 619.797.5456 www.mataelelaw.com
I gather that you weren't married to your ex. If you and your ex lived in California for at least six months, you can probably file in San Diego immediately. I suggest that you contact an experienced family law attorney to assist you.