|
Trishul Chauhan Oodles

Trishul Chauhan (Backend-Sr. Lead Development)

Experience:6+ yrs

Trishul Chauhan is a skilled and experienced Backend developer with a wealth of expertise in Python. He has acquired practical experience working with prominent tools and frameworks such as Django, Flask, MySQL, and PostgreSQL. Trishul's proficiency extends to areas like database migrations and Multi-Schema databases, showcasing his in-depth understanding. He excels in critical software development aspects, including API building, implementation, web services, and code enhancements. He has made significant contributions to various client projects, including Verxtex Media, Myhelpa, and numerous others, consistently delivering exceptional results. Trishul's excellent analytical skills allow him to tackle complex problems effectively. He has a strong enthusiasm for learning new technologies, ensuring his knowledge is up-to-date with the latest advancements in the field.

Trishul Chauhan Oodles
Trishul Chauhan
(Sr. Lead Development)

Trishul Chauhan is a skilled and experienced Backend developer with a wealth of expertise in Python. He has acquired practical experience working with prominent tools and frameworks such as Django, Flask, MySQL, and PostgreSQL. Trishul's proficiency extends to areas like database migrations and Multi-Schema databases, showcasing his in-depth understanding. He excels in critical software development aspects, including API building, implementation, web services, and code enhancements. He has made significant contributions to various client projects, including Verxtex Media, Myhelpa, and numerous others, consistently delivering exceptional results. Trishul's excellent analytical skills allow him to tackle complex problems effectively. He has a strong enthusiasm for learning new technologies, ensuring his knowledge is up-to-date with the latest advancements in the field.

LanguageLanguages

DotENGLISH

Fluent

DotHindi

Fluent

Skills
Skills

DotPython

80%

DotKafka

80%

DotMySQL

80%

DotDjango

80%

DotNo SQL/Mongo DB

80%

DotDot Net

40%

DotPostgres

80%

DotJavascript

60%

DotJava

40%

DotClient Handling

40%

DotProject Management

40%
ExpWork Experience / Trainings / Internship

Nov 2020-Present

Sr. Lead Development

Gurugram


Oodles Technologies

Gurugram

Nov 2020-Present

Apr 2020-Oct 2020

Software Engineer

Gurugram


Acadbee Systems Pvt Ltd

Gurugram

Apr 2020-Oct 2020

Nov 2018-Mar 2020

Software Associate

Delhi


Royal Cube Technologies PVT. Ltd.

Delhi

Nov 2018-Mar 2020

EducationEducation

2010-2014

Dot

Greater Noida Institute of Technology(UPTU)

B.Tech-Computer Science

Top Blog Posts
Tenant Schema In Python Django

The schema is a blueprint of the database that represents the logical, physical view of the database. It is considered as the directory where each directory or schema has its own files or table and functional objects which have the same table and objects in every schema not having any ambiguity.

 

Shared Applications?

Tables whose data is shared with other schema are in the shared App in Django settings. An application that shares data with public schema i.e. sharing public table data with other schemas. consider a table user whose data is utilized by all the schema. This can be added in the shared App and tables are listed under the public schema.

Create a Tenant model. The tenant model must inherit Tenant Mixin. Which contains the schema_name which is the most required field in the model with other fields.
which also has the domain name which is inherited from the domain mixin.

Here is an example, let there be an Organization app that has an Organizations model which has the schema_name in it inherited from Tenant Mixin

class Organizations(TenantMixin):
    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
    name = models.CharField(max_length=100)
    is_active = models.BooleanField(default=True)


class Domains(DomainMixin):
    def __str__(self):
        return self.domain
        

        

Settings.py

data base settings have to update database engine
DATABASES = {
    'default': {
        'ENGINE': 'django_tenants.postgresql_backend',
        # ..
    }
}

 

Add database routers 
depending upon the (shared or tenant) App
add DATABASE_ROUTERS in settings.py

 

Also, Read Django Advance ORM Query

 

Add TenantMainMiddleware Middleware on top
Every request needs to know the right schema.    

 

You must have django.template.context_processors.request listed under the context_processors option of TEMPLATES otherwise the tenant will not be available on request.

 

TEMPLATES = [
    {
        #...
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.request',
                #...
            ],
        },
    },
]


Add the name of the public schema name in setting.py
PUBLIC_SCHEMA_NAME = "public"

 

Add the tenant model that is to be used
TENANT_MODEL = "organizations.Organizations"

 

Add the name of the Domain model in setting.py
TENANT_DOMAIN_MODEL = "organizations.Domains"

 

Add prefix that is to be used in URL for schema wise
TENANT_SUBFOLDER_PREFIX = "org"

 

Also, Read Apache Kafka In Spring Boot

 

Cons of Tenant Schema
When you create a new schema, it executes all migrations files to date in the new schema which can take a long time as the migrations files increases in the application.

To overcome this You can use copy schema technique in which there is a base schema whose copy is created for the new schema which has migrations already executed.

 

This can be implemented in the following way:

In settings.py update 
TENANT_CREATION_FAKES_MIGRATIONS = True

 

Add the schema name from which the new schema will be copied 
TENANT_BASE_SCHEMA = "demodb"

Banner

Don't just hire talent,
But build your dream team

Our experience in providing the best talents in accordance with diverse industry demands sets us apart from the rest. Hire a dedicated team of experts to build & scale your project, achieve delivery excellence, and maximize your returns. Rest assured, we will help you start and launch your project, your way – with full trust and transparency!